summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2020-05-19Style: Remove unnecessary semicolons from `core`Rémi Verschelde
Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
2020-05-19Style: Fix unnecessary semicolons that confused clang-formatRémi Verschelde
2020-05-19Merge pull request #38567 from AndreaCatania/AndreaCatania-patch-3Rémi Verschelde
Removed const from OAHashMap iterator value
2020-05-18Fix leaks and crashes in OAHashMapPedro J. Estébanez
This changes the way the lifespan of items is managed to be consistent. Bonus: Simplify cases of destroy-then-emplace.
2020-05-16Remove HQ2X and the `Image.expand_2x_hq2x()` methodHugo Locurcio
As of Godot 3.0, HQ2X is no longer used to upscale the editor theme and icons on hiDPI displays, which limited its effective uses. HQ2X was also used to upscale the project theme when the "Use Hidpi" project setting was enabled, but results were often less than ideal. The new StyleBoxFlat and SVG support also make HQ2X less important to have as a core feature. This decreases binary sizes slightly (-150 KB on most platforms, -212 KB on WebAssembly release). This partially addresses #12419.
2020-05-15Merge pull request #38760 from akien-mga/error-macros-styleRémi Verschelde
Error macros: Improve style of error messages
2020-05-15Error macros: Improve style of error messagesRémi Verschelde
Document why the `if (1) {} else ((void)0)` construct is used.
2020-05-15Merge pull request #38717 from madmiraal/fix-image-uninitialized-warningRémi Verschelde
Silence 'w' may be used uninitialized in image.cpp warning.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
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.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-14Style: Fix missing/invalid copyright headersRémi Verschelde
2020-05-14Silence 'w' may be used uninitialized in image.cpp warning.Marcel Admiraal
Rename `w` to the more meaningful `data_write`
2020-05-14Enforce use of bool literals instead of integersRémi Verschelde
Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2020-05-14Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde
Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2020-05-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
2020-05-13Implement half axis and inverted axis mapping.Marcel Admiraal
2020-05-13Update game controller enums.Marcel Admiraal
2020-05-13Parse SDL game controller half axis and inverted axis entries.Marcel Admiraal
2020-05-12Add support for multiple RemoteDebuggerPeer(s).Fabio Alessandrelli
It is now possible to register protocol handlers (default tcp://) to support additional debugging communication layers (e.g. websocket).
2020-05-12Rename SSL certificate bundle setting to clarify the "overriding" aspectHugo Locurcio
This closes https://github.com/godotengine/godot-docs/issues/2531.
2020-05-11thirdparty: Cleanup after #38386, document provenance and copyrightRémi Verschelde
Also renamed `delaunay.h` to `delaunay_2d.h` to match the class name.
2020-05-11Merge pull request #38386 from reduz/new-lightmapperRémi Verschelde
New GPU lightmapper
2020-05-11Input: Readd 'Default Android Gamepad' magic bindingRémi Verschelde
Removed by mistake in #38292 like the Windows `__XINPUT_DEVICE__`, this magic binding is referenced directly in our code.
2020-05-10New lightmapperJuan Linietsky
-Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10Merge pull request #38548 from kuruk-mm/add_string_join_to_gdscriptRémi Verschelde
GDScript: Add join method on String
2020-05-10Revert "Renamed plane's d to distance"Rémi Verschelde
This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3. This was wrong, `d` is not a distance but the `d` constant in the parametric equation `ax + by + cz = d` describing the plane.
2020-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10Style: Add missing copyright headersRémi Verschelde
2020-05-10Merge pull request #37020 from aaronfranke/rangeRémi Verschelde
Allow using integer vectors for iteration and make range() use them
2020-05-10Renamed plane's d to distanceMarcus Elg
2020-05-09Merge pull request #38481 from RandomShaper/improve_yieldRémi Verschelde
Fix object leaks caused by unfulfilled yields
2020-05-09Allow Vector2/Vector3 iterators to have non-integer valuesAaron Franke
2020-05-09Allow using integer vectors for iteration and make range() use themAaron Franke
2020-05-09GDScript: Add join method on StringMateo Kuruk Miccino
Docs: Add join on String.xml
2020-05-08Removed const from OAHashMap iterator value Andrea Catania
to allows to mutate the value while iterating over it.
2020-05-07Re-add __XINPUT_DEVICE__hoontee
Required for `JoypadWindows::probe_joypads`. Partially reverts 510e83498e768ffbec8177f18a50180de828b844. Fixes #38554.
2020-05-07Merge pull request #36379 from aaronfranke/color-constructorsRémi Verschelde
Add a Color constructor for Color with alpha
2020-05-07Merge pull request #38536 from ThakeeNathees/trnasform-2-transform2d-convert-fixRémi Verschelde
Fix: can't convert Transform -> Transform2D
2020-05-07Fix: can't convert Transform -> Transform2DThakee Nathees
Fix: #38528
2020-05-07Merge pull request #38522 from ThakeeNathees/printing-empty-string-fixRémi Verschelde
Fix: printing empty string does nothing in editor output pannel
2020-05-07Fix: printing empty string does nothing in editor output pannelThakee Nathees
Fix: #38490
2020-05-06Merge pull request #38393 from nekomatata/printerr-remote-debugger-4.0Rémi Verschelde
Format remote printerr properly in script debugger output
2020-05-05Fix object leaks caused by unfulfilled yieldsPedro J. Estébanez
Now the stack saved in a `GDScriptFunctionState` is cleared as soon as the `yield()` operation is known not to be resumed because either the script, the instance or both are deleted. This clears problems like leaked objects by eliminating cases of circular references between `GDScriptFunctionState`s preventing them and the objects they refer to in their saved stacks from being released. As an example, this makes using `SceneTreeTimer` safer. Furthermore, with this change it's now possible to print early warnings about `yield()`s to released script/instances, as now we know they won't be successfully resumed as the condition for that happens. However, this PR doesn't add such messages, to keep the observed behavior the same for the time being. Also, now a backup of the function name in `GDScriptFunctionState` is used, since the script may not be valid by the time the function name is needed for the resume-after-yield error messages.
2020-05-05Merge pull request #38415 from madmiraal/fix-array-slicingRémi Verschelde
Fix array slicing.
2020-05-05[Windows] Add support for the WinTab API for pen input.bruvzg
2020-05-04Check for empty vectors before trying to access a pointer to the firstMarcel Admiraal
element in Octree<T, use_pairs, AL>::cull_convex().
2020-05-04Merge pull request #37937 from HaSa1002/fix-pckRémi Verschelde
Priorize Embedded PCKs on loading
2020-05-04Priorize Embedded PCKs on loadingHaSa1002
If existing, embedded PCKs are loaded before the pcks the engine might find next to it. Fixes #37568