summaryrefslogtreecommitdiffstats
path: root/core/list.h
Commit message (Collapse)AuthorAgeFilesLines
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-688/+0
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Fix `List` swap behavior on front, back and adjacent elementsAndrii Doroshenko (Xrayez)2020-09-121-15/+25
| | | | | | - immediately return if A == B; - first and last elements (front, back) are updated upon relinking; - handles a special case of forward and backward adjacent elements.
* Removed errors when List::erase() can't find the valuePouleyKetchoupp2020-07-011-1/+1
| | | | | | | | | | | This change makes the behavior consistent when the value is not found between erasing from an empty list (no error, just returning false) and erasing from a non-empty list (previously displaying triggering an error and returning false). Error message previously triggered: ERROR: erase: Condition ' !p_I ' is true. returned: false At: ./core/list.h:157.
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-191-30/+30
| | | | | | | | | | Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-24/+46
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-50/+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.
* Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde2020-05-141-6/+6
| | | | | Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-13/+7
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-1/+2
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Replace NULL with nullptrlupoDharkael2020-04-021-16/+16
|
* Style: Harmonize header guards to style guide [Core]Rémi Verschelde2020-03-251-3/+3
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-171-2/+2
| | | | | | | | | | For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
* Refactor List operator[] to prevent compiler warnings.Marcel Admiraal2020-02-111-14/+4
| | | | | Prevents GCC compiler throwing: control reaches end of non-void function. Prevents Visual Studio throwing C4715: not all control paths return a value.
* 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.
* Remove circular include between core/typedefs.h and core/error_macros.hMarcel Admiraal2019-10-081-0/+1
|
* Remove unnecessary assignmentDawid Kurek2019-06-031-3/+0
|
* Merge pull request #27676 from qarmin/small_fixes_2Rémi Verschelde2019-05-011-4/+2
|\ | | | | Small fixes to static analyzer bugs
| * Small fixes to static analyzer bugsqarmin2019-04-041-4/+2
| |
* | Don't crash on printing nested typesHein-Pieter van Braam-Stewart2019-04-201-0/+4
|/ | | | | | | | | | When adding an Array or Dictionary to itself operator String() got in an infinite loop. This commit adds a stack to operator String() (Through the use of a new 'stringify method'). This stack keeps track of all unique Arrays and Dictionaries it has seen. When a duplicate is found only a static string is printed '[...]' or '{...}'. This mirror Python's behavior in a similar case.
* Core: Ensure classes match their header filenameRémi Verschelde2019-02-121-1/+1
| | | | | | | | | | | | | | | Also drop some unused files. Renamed: - `core/dvector.h` -> `pool_vector.h` - `core/io/resource_import.h` -> `resource_importer.h` - `core/sort.h` -> `sort_array.h` - `core/string_db.h` -> `string_name.h` Dropped: - `core/allocators.h` - `core/os/shell.h` - `core/variant_construct_string.cpp`
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-2/+2
| | | | | | 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.
* Fix typos in code and docs with codespellRémi Verschelde2018-01-181-1/+1
| | | | Using v1.11.0 from https://github.com/lucasdemarchi/codespell
* 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!
* Fixes List<T>::insert_before/afterWill Nations2017-11-211-0/+4
|
* Provide NativeScript properties in definition orderRuslan Mustakov2017-09-051-0/+48
|
* Fix typos 'a' and 'an'Poommetee Ketson2017-09-021-2/+2
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Implement well-defined handling of unrecoverable errorsPedro J. Estébanez2017-07-051-10/+4
| | | | | | Plus the addition of some convenience CRASH_* error macros. Plus transient avoidance of the flood of warnings emitted by Clang when checking 'this' for NULL. Plus explanation about the do-while(0) loop in some error macros.
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Fix typos in source code using codespellRémi Verschelde2017-03-241-3/+3
| | | | From https://github.com/lucasdemarchi/codespell
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-213/+194
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* remove trailing whitespaceHubert Jarosz2016-03-091-26/+26
|
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* Fix List::move_before for front and back elementssheepandshepherd2015-07-101-2/+8
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* Fix a shadow declaration.Felix Laurie von Massenbach2015-02-151-2/+2
|
* Godot UI is quick and snappy again!Juan Linietsky2015-02-151-2/+54
| | | | | Changed linked listed sort to use auxiliary memory this fixes user interface performance issues.
* GODOT IS OPEN SOURCEJuan Linietsky2014-02-091-0/+634