Age | Commit message (Collapse) | Author |
|
Some of this code has been re-organized.
f
|
|
|
|
Fixes the following Clang 5 warnings:
```
modules/bmp/image_loader_bmp.cpp:46:60: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
modules/bmp/image_loader_bmp.cpp:48:61: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
drivers/png/image_loader_png.cpp:231:20: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare]
scene/gui/graph_edit.cpp:1045:8: warning: comparison of constant 0 with expression of type 'bool' is always false [-Wtautological-constant-out-of-range-compare]
core/class_db.cpp:812:13: warning: unused variable 'check' [-Wunused-variable]
core/io/file_access_pack.cpp:172:11: warning: unused variable 'ver_rev' [-Wunused-variable]
core/math/bsp_tree.cpp:195:13: warning: unused variable 'plane' [-Wunused-variable]
core/math/bsp_tree.cpp:168:6: warning: unused variable 'plane_count' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:685:10: warning: unused variable 'ok' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:706:10: warning: unused variable 'ok' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:755:19: warning: unused variable 'var_type' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:1306:12: warning: unused variable 'err' [-Wunused-variable]
modules/gdscript/gdscript_function.cpp:158:15: warning: unused function '_get_var_type' [-Wunused-function]
modules/gdscript/gdscript_parser.cpp:750:20: warning: unused variable 'lv' [-Wunused-variable]
modules/gdscript/gdscript_parser.cpp:59:15: warning: unused function '_find_function_name' [-Wunused-function]
scene/main/node.cpp:2489:13: warning: unused function '_Node_debug_sn' [-Wunused-function]
```
|
|
Changed A* exit condition, added 2 tests for it
|
|
Fixes #21874, supersedes #22065.
|
|
Also move Zlib and Zstd's build instructions to core/SCsub.
|
|
core/math/
Removed obsoleted core/helper/value_evaluator.h and moved math_fieldwise to core/math/
|
|
Note: Core only.
|
|
Misc. typos
|
|
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
|
|
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.
|
|
|
|
A* now exits when next node from open set with least cost happens to be end_point,
not when node with least cost has end_point as a neigbour.
Added two tests for astar:
* ABC tests case where start and end node are
neigbours
* ABCX tests case with intermediate nodes
|
|
[Mono] Quat - add some missing constructors and methods
|
|
|
|
|
|
Fixed bugs in expression class
|
|
|
|
|
|
We delete the faces for consideration in this loop but we can still
sometimes find an edge that connects to this face. We now interate over
all edges and disconnect edges connecting to this face.
This fixes #16560 and fixes #17569
|
|
|
|
|
|
|
|
Math2D includes Transform2D, which includes Rect2, which includes Vector2.
|
|
Math constant definitions belong in `math_defs.h`. Also, the grammer in these files really needed some updating.
|
|
|
|
Makes 2D math code easier to read and makes Vector2 consistent with Vector3. In the future, we may move other things out of math_2d as well.
|
|
|
|
|
|
-Added expression evaluation to EditorSpinSlider, fixes #20813, fixes #18932
|
|
Removed incorrect Basis::set_scale().
|
|
This commit makes operator[] on Vector const and adds a write proxy to it. From
now on writes to Vectors need to happen through the .write proxy. So for
instance:
Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;
Failing to use the .write proxy will cause a compilation error.
In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.
_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
|
|
|
|
[Core] [Math] Fix fposmod() function
|
|
Change the neighbours vector to a set in AStar
|
|
This fixes an issue where one could not disconnect two points that were connected more than once.
|
|
Fixed Basis -> Quat conversions, added a few safety checks.
|
|
|
|
|
|
ffff
meth
|
|
|
|
|
|
Fixes #19027.
|
|
Also added a missing constructor in Basis, and fixed usage of inverse and affine inverse in Transform.
|
|
Also even out Basis and Quat APIs a little.
|
|
Add Geometry::line_intersects_line_2d()
|
|
Now both structs (Vector2 & Vector3) have round, floor & ceil methods.
(see #18603)
|
|
Fixes most current reports on Coverity Scan of uninitialized scalar
variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html
These happen most of the time (in our code) when instanciating structs
without a constructor (or with an incomplete one), and later returning
the instance. This is sometimes intended though, as some parameters are
only used in some situations and should not be double-initialized for
performance reasons (e.g. `constant` in ShaderLanguage::Token).
|
|
Also ensure that get_scale doesn't arbitrarlity change the signs of scales, ensuring that the combination of get_rotation and get_scale gives the correct basis.
Added various missing functions and constructors.
Should close #17968.
|
|
|