Age | Commit message (Collapse) | Author |
|
This attribute is now part of the standard we target so we no longer
need compiler-specific hacks.
Also enables -Wimplicit-fallthrough for Clang now that we can properly
support it. It's already on by default for GCC's -Wextra.
Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
|
|
|
|
Fix Visual Studio throwing C4996 warning in ustring.cpp.
|
|
Close #35872
|
|
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.
|
|
|
|
|
|
Before this fix, opening relative export paths inside of an EditorFileDialog was not possible. This was fixed by modifying String::path_to_file() to save relative paths in EditorExportPreset::set_export_path() more appropriately and changing EditorFileDialog::set_current_dir() to open relative paths.
|
|
|
|
|
|
|
|
|
|
Use _set_output_format() on MINGW platform to force _snprintf_s() to
conform to the C99 standard and match the other platforms.
Fixes #24137
|
|
|
|
|
|
The method signature is also changed to use `uint64_t` instead of `size_t`
for it to be Variant-compatible.
|
|
Create a GDScript String function repeat
|
|
Fix i18n in `String::humanize_size()`
|
|
Calls to `RTR()` must be added to each string so the PO file generator
can pick them up.
|
|
|
|
- Use "B" insted of "Bytes" to be more compact
- Use suffixes that denote a binary prefix
- Make suffixes localizable
This removes the need for the custom
`EditorNetworkProfiler:_format_bandwidth()` method.
|
|
Fixes #30610
|
|
|
|
Prevent int overflow and underflow
|
|
|
|
Crypto classes will be placed in core/crypto.
|
|
|
|
This is actually expected by the function although it was apparently
working in GCC without the terminator, it breaks (at least some) clang
versions.
|
|
|
|
|
|
Godot core needs MD5/SHA256/AES/Base64 which used to be provided by
separate libraries.
Since we bundle mbedtls in most cases, and we can easily only include
the needed sources if we so desire, let's use it.
To simplify library changes in the future, and better isolate header
dependencies all functions have been wrapped around inside a class in
`core/math/crypto_base.h`.
If the mbedtls module is disabled, we only bundle the needed source
files independently of the `builtin_mbedtls` option.
If the module is enabled, the `builtin_mbedtls` option works as usual.
Also remove some unused headers from StreamPeerMbedTLS which were
causing build issues.
|
|
|
|
|
|
Make second parameter of substr optional
|
|
Make humanized size rounding clearer by padding decimals with zeroes
|
|
Fix display of large sizes in the editor monitors
|
|
Small fixes to unrechable code, possibly overflows, using NULL pointers
|
|
For example, "5 MB" will now be displayed as "5.00 MB" to make the
rounding precision clear, regardless of the value being rounded.
This closes #29611.
|
|
Unlike the old custom method, the `String::humanize_size()`
method works well with file sizes above 2 GB.
This also tweaks the suffixes for spacing consistency and
uses the correct acronym for exabytes (EB).
This closes #29610.
|
|
|
|
Supersedes #27736.
|
|
|
|
point is written in a hex literal. Added highlighting for binary literals in GDScript
|
|
Added constructor and assignment operator for CharString
from const char* to simplify memory management when working with
utf8/ascii strings for APIs taking char*.
Reworked OS_X11::set_context to use CharString and avoid some manual
memory management.
|
|
Allows enabling/disabling parts of the editor and storing/loading profiles for that.
|
|
This can happen when chaining calls to various string methods when the
string is empty.
|
|
|
|
Fixes #25316.
|
|
|
|
Background: lstrip and rstrip were broken by changes to String in:
0e29f7974b59e4440cf02e1388fb9d8ab2b5c5fd
which removed it's access to Vector::find(CharType).
Moved Vector's find up into CowData so it can be shared by Vector and String.
Added String::find_char using CowData::find.
Implemented rstrip and lstrip using find_char.
Added a few tests for String rstrip and lstrip.
|