summaryrefslogtreecommitdiffstats
path: root/editor/fileserver
Commit message (Collapse)AuthorAgeFilesLines
* Add a new HashSet templatereduz2022-05-202-2/+2
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Replace most uses of Map by HashMapreduz2022-05-162-3/+3
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-022-7/+4
| | | | | | | | | | | Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-112-5/+3
|
* Fix some issues found by cppcheck.bruvzg2022-04-061-2/+2
|
* Zero initialize all pointer class and struct membersRémi Verschelde2022-04-041-1/+1
| | | | | This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
* Remove duplicate editor settings definitionskobewi2022-03-061-2/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-032-4/+4
| | | | Happy new year to the wonderful Godot community!
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-1/+1
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|
* 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/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-061-1/+1
|
* Fix crash on cleanup of EditorFileServerPedro J. Estébanez2021-03-062-3/+4
|
* Modernize ThreadPedro J. Estébanez2021-01-292-9/+7
| | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* Update copyright statements to 2021Rémi Verschelde2021-01-012-4/+4
| | | | | | | | | | | | | | 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 🎆
* Initialize class/struct variables with default values in platform/ and editor/Rafał Mikrut2020-12-021-3/+3
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Refactor MethodBind to use variadic templatesreduz2020-10-181-1/+1
| | | | Removed make_binders and the old style generated binders.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-142-21/+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.
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-262-10/+9
| | | | | | | | | | | | | | | | Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
* Update copyright statements to 2020Rémi Verschelde2020-01-012-4/+4
| | | | | | | | | | | 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.
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-13/+13
| | | | Fixes #25316.
* Update copyright statements to 2019Rémi Verschelde2019-01-012-4/+4
| | | | Happy new year to the wonderful Godot community!
* Fix deploy with network filesystemGeorge Marques2018-11-101-5/+5
| | | | Also make some prints only happen in verbose mode.
* SCons: Build thirdparty code in own env, disable warningsRémi Verschelde2018-09-281-1/+1
| | | | | Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
* Unify StreamPeerTCP/TCP_Server with NetSocket APIFabio Alessandrelli2018-09-121-1/+1
|
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-122-6/+6
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-8/+8
|
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Display set_nodelay to GDScriptMarlon Henry Schweigert2018-01-301-1/+1
| | | | | | | | | | | Pass enabled arg Rename set_nodelay to set_no_delay Add description to the method Change description
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-052-0/+2
| | | | | | 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-012-4/+4
| | | | Happy new year to the wonderful Godot community!
* Made Vector::ptrw explicit for writing, compiler was sometimes using the ↵Juan Linietsky2017-11-251-2/+1
| | | | | | wrong function, leading to unnecesary copy on writes and reduced performance.
* Fix various assorted warningsHein-Pieter van Braam2017-09-081-1/+1
| | | | | Fix various warnings that don't have enough instances to merit individual commits. Also fixes a potential bug in audio_server.cpp.
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-272-2/+2
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-082-0/+2
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-052-151/+135
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Refactoring: rename tools/editor/ to editor/Rémi Verschelde2017-03-053-0/+453
The other subfolders of tools/ had already been moved to either editor/, misc/ or thirdparty/, so the hiding the editor code that deep was no longer meaningful.