When interpolating between two equal int values a and b, floating point
calculation imprecisions can result in different values depending on
the interpolation factor.
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.
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
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.
Reduz optimized field indexing in 3c85703 but the changes didn't apply
to dictionary so this code remained untouched. However, the logic for
validity checking was changed but not updated for the dictionary case.
Uninitialzed values in GDScript are of type NIL so not allowing null
comparisons did end up breaking some code.
This commit reenables NULL equality checks for all types. We're going to
have to figure out how to make this fast for the compiler later.
We now allow booleanization of all types. This means that empty versions
of all types now evaluate to false. So a Vector2(0,0), Dictionary(),
etc.
This allows you to write GDScript like:
if not Dictionary():
print("Empty dict")
Booleanization can now also no longer fail. There is no more valid flag,
this changes Variant and GDNative API.
After a short discussion with @reduz and @karroffel we decided to make
all non number/number comparisons return type errors on comparisons.
Now bool == bool is allowed but Vector2 == Vector3 is a type error and
no longer 'not equal'. The same has been done for the != operators.
In addition I forgot to add some failures to some Object operators
meaning that there was a potential for a crasher.
In an effort to make GDScript a little faster replace the double
switch() with a computed goto on compilers that set __GNUC__. For
compilers that don't support computed goto it will fall back to regular
switch/case statements.
In addition disable using boolean values in a mathematical context. Now
boolean values can only be compared with other booleans. Booleans will
also no longer be coerced to integers.
This PR replaces #11308 and fixes#11291
-Added ability to set/get a field in GetSet, as well as assignment ops
-Added a Select node
-Fixed update bugs related to variable list and exported properties, closes#9458
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
- Add FIXME tags comments to some unfixed potential bugs
- Remove some checks (always false: unsigned never < 0)
- Fix some if statements based on reviews.
- Bunch of missing `else` statements