Applied a couple of checks suggested by @dhoverml for when the
XrResult is not XR_SUCCESS but is also not a failure. Also simplified
checks from @BastiaanOlij feedback.
We allow using auto for lambdas or complex macros where a return type
may change based on the parameters. But where the type is clear, we
should be explicit.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.
This is wasteful on multiple aspects:
- Binary size: Around 20% binary size reduction with exceptions disabled
for both MSVC and GCC binaries.
- Compile time:
* More than 50% build time reduction with MSVC.
* 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.
Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
This commit adds the classes OpenXRExtensionWrapperExtension and OpenXRAPIExtension
that can be used in GDExtensions to define OpenXR extension wrappers.
It modifies extension wrapper registration so that they can be registered
before OpenXRAPI instantiation (e.g. in core level initialization of GDExtensions).
Developed by Migeran (https://migeran.com)
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:
Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.
Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:
- Local includes
* Conditional local includes
- Core includes
* Conditional core includes
- Thirdparty includes
* Conditional thirdparty includes
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.