summaryrefslogtreecommitdiffstats
path: root/modules/mono/utils/string_utils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mono: Fix typo to `foreach` C# keywordiamjsk102022-06-171-1/+1
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-3/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3Hugo Locurcio2021-10-301-6/+6
| | | | | - Use lowercase driver names for the `--rendering-driver` command line argument.
* clang-format: Disable alignment of operands, too unreliableRémi Verschelde2021-10-281-18/+18
| | | | | | | | | Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
* Remove `#ifdefs` for handling compilation with Visual Studio < 2015Hugo Locurcio2021-08-311-1/+1
| | | | Godot 3.3 and later require Visual Studio 2017 to be compiled.
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-1/+1
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* Rename File::get_len() get_length()Marcel Admiraal2021-05-251-1/+1
|
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-3/+3
|
* Mono/C#: Fix several clang-tidy warnings and cleanupIgnacio Etcheverry2020-07-051-4/+8
|
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-1/+0
| | | | | | | | | | | | | | 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.
* Remove some C++11 polyfill defines that are no longer neededHugo Locurcio2020-05-031-10/+0
|
* Replace NULL with nullptrlupoDharkael2020-04-021-1/+1
|
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-4/+4
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Mono/C#: Initial exporter support for AOT compilationIgnacio Etcheverry2019-11-151-4/+20
|
* Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde2019-09-251-1/+1
|\ | | | | Added some obvious errors explanations
| * Added some obvious errors explanationsqarmin2019-09-251-1/+1
| |
* | Mono: Fix unable to create log file due to str_format bugIgnacio Etcheverry2019-09-081-3/+7
|/
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'modules/mono'Ignacio Etcheverry2019-08-091-4/+1
| | | | | | And 'CRASH_*_MSG' as well. Also make error messages puntuation and quotation more consistent.
* Fixes minor issues found by static analyzerqarmin2019-07-071-1/+1
|
* Fix generation of Mono Glue for Visual Studio 2017+ShyRed2019-05-051-1/+1
| | | | vsnprintf definition should only be changed when MSC version is older than 2013. The version check and fix is taken from StringUtils.h of assimp.
* Ignore a warning in _get_socket_error (-Wlogical-op).marxin2019-05-021-1/+1
| | | | | | | | | | | | | | drivers/unix/net_socket_posix.cpp: In member function 'NetSocketPosix::NetError NetSocketPosix::_get_socket_error()': drivers/unix/net_socket_posix.cpp:197:22: warning: logical 'or' of equal expressions [-Wlogical-op] 197 | if (errno == EAGAIN || errno == EWOULDBLOCK) | ^ and: modules/mono/utils/string_utils.cpp: In function 'int {anonymous}::sfind(const String&, int)': modules/mono/utils/string_utils.cpp:68:48: error: logical 'or' of collectively exhaustive tests is always true [-Werror=logical-op] found = src[read_pos] == 's' || (c >= '0' || c <= '4'); ~~~~~~~~~^~~~~~~~~~~
* Fix missing argument for vsnprintf_sIgnacio Etcheverry2019-04-301-1/+2
|
* C# bindings generator cleanupIgnacio Etcheverry2019-04-251-0/+49
| | | | | | - Normal log messages are no longer warnings. - BindingsGenerator is no longer a singleton. - Added a log function.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Parse C# script namespace and classIgnacio Etcheverry2018-10-251-0/+28
| | | | - Added a very simple parser that can extract the namespace and class name of a C# script.
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Style: Apply new clang-format 5.0 style to all filesRémi Verschelde2017-12-071-1/+1
|
* Improve signature of signal target generated functionIgnacio Etcheverry2017-10-161-0/+29
|
* Added mono moduleIgnacio Etcheverry2017-10-031-0/+128