Age | Commit message (Collapse) | Author |
|
|
|
I made a wrong assumption that initialization the other pointer in the
union would properly initialize the `childs` array.
|
|
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
|
|
Adds DEV_ASSERTS that will halt at runtime if the BVH is misused with invalid IDs, and adds ERR_FAIL macros to prevent calling with invalid IDs.
Any such misuse is a bug in the physics, but this should flag any errors quickly.
|
|
|
|
taigi100/Bugfix-#59215-Standard-color-name-returns-non-standard-color-code
|
|
|
|
|
|
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
|
|
This method was meant only as a convenience for editor code
to allow using a step of 0 to disable snapping.
It was exposed by mistake when refactoring GlobalScope.
|
|
A previous PR had changed the array operator to give unbounded access. This could cause crashes where old code depended on this previous safe behaviour.
This PR adds DEV_ASSERT macros for out of bound access to DEV builds, allowing us to quickly identify bugs in calling code, without affecting performance in release or release_debug editor builds.
|
|
[4.x] BVH - Sync BVH with 3.x
|
|
|
|
|
|
Uses (real_t) casting to ensure appropriate calculations are done in 32 bit where real_t is compiled as 32 bit.
|
|
Add add Vector3 operator in Vector3i.
|
|
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
|
|
|
|
Converts float literals from double format (e.g. 0.0) to float format (e.g. 0.0f) where appropriate for 32 bit calculations.
|
|
|
|
Remove a cross include from a_star.cpp
|
|
|
|
* Vector2i and Vector3i mul/div by a float results in Vector2 and Vector3 respectively.
* Create specializations to allow proper bindings.
This fixes #44408 and supersedes #44441 and keeps the same rule of int <op> float returnig float, like with scalars.
|
|
Fix Expression's parsing of positive exponent literals
|
|
|
|
|
|
Templated mask checks and generic NUM_TREES
Fix leaking leaves
|
|
Some were declared as structs (public by default) and others as classes
(private by default) but in practice all these math types exposed as
Variants are all 100% public.
|
|
Also reduce interdependencies and clean up a bit.
|
|
And take the opportunity to improve interdependencies a bit with forward
declares where possible.
|
|
|
|
fixed formatting
|
|
Use clear() instead of resize(0).
Use has() instead of "find(p_val) != -1".
|
|
|
|
Clarify expand documentation
|
|
scripts and expressions.
|
|
These are not used consistently and some can conflict with
system-specific defines. While here, also delete some unused macros.
|
|
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
|
|
|
|
|
|
|
|
|
|
|
|
Add length and length_squared to Vector2i/3i
|
|
|
|
Using codespell 2.1.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
ans
ba
curvelinear
dof
doubleclick
fave
findn
gird
inout
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
|
|
|
|
|
|
|
|
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.
`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
|