summaryrefslogtreecommitdiff
path: root/core/ustring.cpp
AgeCommit message (Collapse)Author
2020-04-04Improve the shader error console outputHugo Locurcio
This makes the line gutter look more like an actual line gutter, which makes it less confusing.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-20i18n: Add support for translating the class referenceRémi Verschelde
- Parse `.po` files from `doc/translations/*.po` like already done with `editor/translations/*.po`. - Add logic to register a doc translation mapping in `TranslationServer` and `EditorSettings`. - Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`). Strings are automatically dedented and stripped of whitespace to ensure that they would match the translation catalog. - Use `DTR()` to translate relevant strings in `EditorHelp`, `EditorInspector`, `CreateDialog`, `ConnectionsDialog`. - Small simplification to `TranslationLoaderPO`, the path argument was not really meaningful.
2020-03-16Tweak the invalid Unicode error message to be more descriptiveHugo Locurcio
This closes #28503.
2020-02-23Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde
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.
2020-02-11A lot of progress with canvas rendering, still far from working.Juan Linietsky
2020-02-11Merge pull request #33731 from madmiraal/fix-c4996-warningRémi Verschelde
Fix Visual Studio throwing C4996 warning in ustring.cpp.
2020-02-03Fixed String::humanize_size crash.dankan1890
Close #35872
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-12-20Encodes property names properly in project.godotHaoyu Qiu
2019-12-18Fix build warning in ustring.cpp on Windows/MSVC platformYuri Roubinsky
2019-12-16Fixed issues with using a relative path in the export window.Catchawink
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.
2019-12-10Removed unused variables, add some constants numbersRafał Mikrut
2019-11-20Fix some overflows and unitialized variablesRafał Mikrut
2019-11-19Fix Visual Studio throwing C4996 warning in ustring.cpp.Marcel Admiraal
2019-11-08Fix MinGW/clang/LLD/UCRT build.bruvzg
2019-11-07Fix #24137 Different number of leading zeros on MINGW printf("%lg")Jamie Pate
Use _set_output_format() on MINGW platform to force _snprintf_s() to conform to the C99 standard and match the other platforms. Fixes #24137
2019-11-01Fix some crashes, overflows and using variables without valuesRafał Mikrut
2019-10-04Remove redundant condition in `String::_humanize_digits()`Hugo Locurcio
2019-10-04Bind the `String::humanize_size` methodAndrii Doroshenko (Xrayez)
The method signature is also changed to use `uint64_t` instead of `size_t` for it to be Variant-compatible.
2019-09-24Merge pull request #31883 from aole/create-string-function-repeatRémi Verschelde
Create a GDScript String function repeat
2019-09-23Merge pull request #32273 from Calinou/humanize-size-fix-i18nRémi Verschelde
Fix i18n in `String::humanize_size()`
2019-09-23Fix i18n in `String::humanize_size()`Hugo Locurcio
Calls to `RTR()` must be added to each string so the PO file generator can pick them up.
2019-09-22Changed some code found by Clang Tidy and Coverityqarmin
2019-09-05Improve the `String::humanize_size()` methodHugo Locurcio
- 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.
2019-09-03Create a GDScript String function repeatBhupendra Aole
Fixes #30610
2019-08-24Add forgotten pointer checkingqarmin
2019-08-23Merge pull request #31513 from qarmin/int_overflowRémi Verschelde
Prevent int overflow and underflow
2019-08-22Prevent int overflow and underflowqarmin
2019-08-19Move CryptoCore to it's own folder.Fabio Alessandrelli
Crypto classes will be placed in core/crypto.
2019-07-23Added count method to StringChaosus
2019-07-08Add NULL-terminator the string passed to strtol.Fabio Alessandrelli
This is actually expected by the function although it was apparently working in GCC without the terminator, it breaks (at least some) clang versions.
2019-07-07Fixes minor issues found by static analyzerqarmin
2019-07-03Add sha1 functions to string (using new CryptoCore)Fabio Alessandrelli
2019-07-02CryptoCore class to access to base crypto utils.Fabio Alessandrelli
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.
2019-07-01Remove unnecessary code and add some error explanationsqarmin
2019-06-26Some code changed with Clang-Tidyqarmin
2019-06-19Merge pull request #28648 from KoBeWi/substr-1Rémi Verschelde
Make second parameter of substr optional
2019-06-12Merge pull request #29616 from Calinou/humanize-size-clearer-roundingRémi Verschelde
Make humanized size rounding clearer by padding decimals with zeroes
2019-06-12Merge pull request #29615 from Calinou/fix-editor-monitor-large-sizesRémi Verschelde
Fix display of large sizes in the editor monitors
2019-06-12Merge pull request #29306 from qarmin/small_code_fixesRémi Verschelde
Small fixes to unrechable code, possibly overflows, using NULL pointers
2019-06-08Make humanized size rounding clearer by padding decimals with zeroesHugo Locurcio
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.
2019-06-08Fix display of large sizes in the editor monitorsHugo Locurcio
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.
2019-06-03Small fixes to unrechable code, possibly overflows, using NULL pointersqarmin
2019-05-31Fix and expose String::strip_escapes(), use it in LineEdit pasteRémi Verschelde
Supersedes #27736.
2019-05-03Make second parameter of substr optionalTomasz Chabora
2019-04-25Support for binary literals in GDScript. Added an error that shows if a ↵jude-lafitteIII
point is written in a hex literal. Added highlighting for binary literals in GDScript
2019-04-22fixed an access after free in OS_X11::set_context.Ibrahn Sahir
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.
2019-04-08Add ability to edit editor feature profilesJuan Linietsky
Allows enabling/disabling parts of the editor and storing/loading profiles for that.
2019-02-22Don't crash when parse_utf8 receives a NULL pointerHein-Pieter van Braam
This can happen when chaining calls to various string methods when the string is empty.