Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
It's still okay as long as it's a constant value. This should already
been validated by the analyzer.
|
|
|
|
|
|
|
|
|
|
|
|
Sometimes to fix something you have to break it first.
This get GDScript mostly working with the new tokenizer and parser but
a lot of things isn't working yet. It compiles and it's usable, and that
should be enough for now.
Don't worry: other huge commits will come after this.
|
|
GDScript debugger incorrect error line fixed
|
|
if the first line of an else or an elif throws a runtime error the
debugger shows incorrect line number.
|
|
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.
|
|
Part of #33027.
|
|
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.
|
|
|
|
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.
Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
|
|
EngineDebugger is the new interface to access the debugger.
It tries to be as agnostic as possible on the data that various
subsystems can expose.
It allows 2 types of interactions:
- Profilers:
A subsystem can register a profiler, assigning it a unique name.
That name can be used to activate the profiler or add data to it.
The registered profiler can be composed of up to 3 functions:
- Toggle: called when the profiler is activated/deactivated.
- Add: called whenever data is added to the debugger
(via `EngineDebugger::profiler_add_frame_data`)
- Tick: called every frame (during idle), receives frame times.
- Captures: (Only relevant in remote debugger for now)
A subsystem can register a capture, assigning it a unique name.
When receiving a message, the remote debugger will check if it starts
with `[prefix]:` and call the associated capture with name `prefix`.
Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new
profiler system.
Port SceneDebugger and RemoteDebugger to the new capture system.
The LocalDebugger also uses the new profiler system for scripts
profiling.
|
|
objects and made them default.
|
|
|
|
|
|
Pass the calculated index from the stack and use the same to get and set
the value. This avoids a function with side effects being evaluated
twice when using indexing in an assignment with operation statement
(e.g. a[function()] += 1).
|
|
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.
|
|
|
|
Fix misc. source comment typos
|
|
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
|
|
Before this patch, assert() only took the condition to assert on:
assert(item_data)
Now, it can optionally take a string that will be printed upon failure:
assert(item_data, item_name + " has no item data in ItemDatabase")
This makes it easier to immediately see what the issue is by being
able to write informative failure messages.
Thanks to @wiped1 for sharing their patch, upon which this is based.
Closes #17082
|
|
"modules/gdnative", "modules/gdscript" directories.
|
|
|
|
|
|
|
|
Closes #27489
Fixup of 466a76ac2c7c6634ed1d78fde4ac011e2e70b710
Additionally, update `GDScriptCompiler` test to use Ref and to include `as` expressions.
|
|
Fix GDScriptCompiler bugging out with identically-named inner class
|
|
Fixes #27111
|
|
Fixes #26789
|
|
Fixes #25316.
|
|
They had been reserved for future implementation, but we now have the
`match` CF keyword which does the same and more.
According to @reduz `do` was even added by mistake when copying from
the shader language parser, it was never intended to add support for
`do`... `while` loops, as the syntax would be awkward in GDScript,
and the added sugar is not worth it.
Fixes #25787.
|
|
Otherwise these checks might trigger the insertion of an empty value,
leading to crashes.
|
|
Happy new year to the wonderful Godot community!
|
|
Fix errors 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, and 15.
|
|
This reverts commit 54bdc1e1f6a7fb85a5b193c9b8ecf0dcf06949e6.
|
|
Fixes #22443.
|
|
|
|
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
|
|
Allow `is` operator to test built-in types
|
|
|
|
- gdscript
- gdscript_compiler
- regex
- android/export
- gles3/rasterizer (scene and storage)
|