summaryrefslogtreecommitdiffstats
path: root/core/error_macros.h
Commit message (Collapse)AuthorAgeFilesLines
* Style: Harmonize header guards to style guide [Core]Rémi Verschelde2020-03-251-1/+1
|
* typedefs: Cleanup unused macros and unnecessary checksRémi Verschelde2020-03-111-10/+10
| | | | | | | | | | We now require a compiler with C++17 support, so we don't need to check for features added to GCC 5 or Clang 3.2. Clang builtin availability checks were unused anyway as Clang defines `__GNUC__` as it's also a GNU C implementation. Fixes #36986.
* error_macros.h typo fixedThakee Nathees2020-03-041-10/+10
|
* Remove do{ } while(0) wrapper around error macros.Marcel Admiraal2020-02-081-212/+190
| | | | | | | | | | | | | | | | As pointed out by Faless, a do{ } while(0) wrapper around a continue or break just ends the do{ } while(0) loop. The do{ } while(0) loop exists to enable the macro to be used as a function which requires a semicolon. The alternative approach is to use an if(1) { } else ((void)0) wrapper. Since the macro already has an if(unlikely(m_cond)) { } this patch simply adds the else ((void)0) to this if statement instead. For consistency all the macros have been updated in the same way, and trailing else warnings corrected. However, the wrappers around ERR_PRINT and WARN_PRINT were removed, because they generated too many ambiguous trailing else warnings. They are also single line macros so a wrapper is not needed.
* Apply macro documentation from #35521.Marcel Admiraal2020-02-051-81/+268
|
* Remove trailing semicolons from do..while wrappers.Marcel Admiraal2020-02-051-12/+12
| | | | | | | - Remove trailing semicolons from ERR_FAIL_INDEX macros. - Remove trailing semicolons from ERR_FAIL_UNSIGNED_INDEX macros. - Remove trailing semicolons from CRASH_BAD_INDEX macros. - Remove trailing semicolons from CRASH_BAD_UNSIGNED_INDEX macros.
* Add do..while(0) wrappers to macros without one.Marcel Admiraal2020-02-051-79/+79
| | | | | | | | | | | | | - Add do..while(0) wrapper to ERR_FAIL_NULL macros. - Add do..while(0) wrapper to ERR_FAIL_COND macros. - Add do..while(0) wrapper to ERR_CONTINUE macros. - Add do..while(0) wrapper to ERR_BREAK macros. - Add do..while(0) wrapper to CRASH_COND macros. - Add do..while(0) wrapper to ERR_FAIL macros. - Add do..while(0) wrapper to ERR_PRINT macros. - Add do..while(0) wrapper to WARN_PRINT macros. - Add do..while(0) wrapper to WARN_DEPRECATED macros. - Add do..while(0) wrapper to CRASH_NOW macros.
* Remove duplicate WARN_PRINT macro.Marcel Admiraal2020-02-051-5/+0
|
* Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-051-5/+0
|
* Clean up error_macros.hMarcel Admiraal2020-02-051-258/+201
|
* Improve and document error macrosHugo Locurcio2020-01-241-114/+198
| | | | | | | Documentation can be visible in many IDEs by hovering the macro anywhere it's used. Error message styling was also tweaked for consistency.
* 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.
* Fix explain message not being stripped in release.Fabio Alessandrelli2019-11-131-72/+79
| | | | | | | | Messages coming from ERR_EXPLAIN / ERR_*_MSG macros used to strip the error explanation in release builds and was changed in a recent refactoring. This commit restores the old behaviour (fixing release builds).
* Remove ERR_EXPLAIN macros and the scaffolding they needed.Marcel Admiraal2019-11-111-56/+0
|
* Send m_msg directly to _err_print_error().Marcel Admiraal2019-11-101-114/+109
|
* Remove implicit dependency on String from error_macros.h.Marcel Admiraal2019-11-061-12/+15
|
* implement accompanying error macros that come with an error message, to ↵Robin Hübner2019-08-081-0/+137
| | | | replace ERR_EXPLAIN usage.
* Some code changed with Clang-Tidyqarmin2019-06-261-18/+18
|
* Fix typos with codespellRémi Verschelde2019-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Typo fix: "the function exists" -> "the function exits"follower2019-03-251-3/+3
| | | | | As far as I can tell, the intended word here is "exits" rather than "exists" but it's not 100% clear. I'm assuming the intention is to express something along the lines of "An index has failed if m_index >=m_size; [if this happens then] the function exits."
* Clean up blend shape support in GLES2 and GLES3.Juan Linietsky2019-03-011-0/+20
|
* Fix all -Wtype-limits warnings.marxin2019-02-211-0/+14
|
* 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-1/+1
| | | | | | 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 sure warn deprecated uses a volatile bool (for multithreading)Juan Linietsky2018-08-071-1/+1
|
* Style: Apply clang-format (5.0) to some missed filesRémi Verschelde2018-05-311-8/+8
|
* Add a macro to deprecate methodsJuan Linietsky2018-04-181-0/+10
|
* Fix typos with codespellluz.paz2018-02-211-1/+1
| | | | | | | | | | | | | | Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt` Whitelist consists of: ``` ang doubleclick lod nd que te unselect ```
* 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!
* Improved *_FAIL_INDEX error macros to print the index/sizeMarcelo Fernandez2017-10-221-20/+21
|
* Implement Linux-style likely()/unlikely() macrosHein-Pieter van Braam2017-09-211-10/+11
| | | | | | | | | | | | | | This implement branch prediction macros likely() and unlikely() like in Linux. When using these macros please ensure that when you use them the condition in the branch really is very, very likely or unlikely. Think 90+% of the time. Primarily useful for error checking. (And I implement these macros for all our error checking macros now) See this article for more information: https://kernelnewbies.org/FAQ/LikelyUnlikely There are more places where these macros may make sense in renderer and physics engine. Placing them will come in another commit down the line.
* 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-5/+49
| | | | | | 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
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-88/+121
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge remote-tracking branch 'origin/gles3' into gles3-on-masterRémi Verschelde2017-01-021-1/+2
|\ | | | | | | | | Various merge conflicts have been fixed manually and some mistakes might have been made - time will tell :)
| * 2D Shaders are working again using the new syntax, though all is buggy in ↵Juan Linietsky2016-10-101-1/+2
| | | | | | | | general
* | 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-6/+6
|
* Completed the support for plugins! It is not possible to add plugins.Juan Linietsky2016-02-271-0/+5
| | | | | | Not all APIs are provided yet, please request whathever you are missing. Some example plugins are provided in demos/plugins. Just copy them to a folder in your project named addons/ and then enable them from the project settings. Have fun!
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* -Display on animation editor which keys are invalid and which tracks are ↵Juan Linietsky2015-12-051-0/+5
| | | | | | unresolved -Added a tool to clean up unresolved tracks and unused keys
* merged some stuff for okamJuan Linietsky2015-09-031-9/+9
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* GODOT IS OPEN SOURCEJuan Linietsky2014-02-091-0/+222