Age | Commit message (Collapse) | Author |
|
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
|
|
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
|
|
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
-o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
-o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```
This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.
This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.
Part of #33027.
|
|
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
|
|
|
|
Happy new year to the wonderful Godot community!
We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.
Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
|
|
|
|
When adding an Array or Dictionary to itself operator String() got in an
infinite loop. This commit adds a stack to operator String() (Through
the use of a new 'stringify method'). This stack keeps track of all
unique Arrays and Dictionaries it has seen. When a duplicate is found
only a static string is printed '[...]' or '{...}'.
This mirror Python's behavior in a similar case.
|
|
Happy new year to the wonderful Godot community!
|
|
Added .get() method to Dictionary class in GDScript to return the value if the key exists, or return Null if the key does not exist.
|
|
Some of this code has been re-organized.
f
|
|
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
|
|
|
|
Same as erase, but it returns a boolean value indicating whether the pair was erased or not.
This method should be removed during the next compatibility breakage, and 'Dictionary::erase(key)' should be changed to return a boolean.
|
|
|
|
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate
Fixes #13971
|
|
Dictionaires did not use the VariantHasher and VariantComparator making
them unsafe for use with NaN values as keys. This PR uses the
appropriate Variant implementations for these functions.
var d = {}
d[Vector2(NAN, NAN)] = 0
d[Vector2(NAN, NAN)] = 0
print(d.size())
will now output '1' and not '2'
This fixes #16031
|
|
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
|
|
Happy new year to the wonderful Godot community!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
|
|
Made sure files in core/ and tools/ have a proper Godot license header
when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h}
to rect3.{cpp,h} and class_db.{cpp,h} respectively.
Also added a proper header to core/io/base64.{c,h} after clarifying
the licensing with the original author (public domain).
|
|
|
|
|
|
|
|
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|