Commit graph

31 commits

Author SHA1 Message Date
reduz 127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Rémi Verschelde 85220fec01 Style: Remove unnecessary semicolons from core
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.
2020-05-19 15:57:56 +02:00
Rémi Verschelde 0ee0fa42e6 Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14 21:57:34 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
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.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 1f6f364a56 Port member initialization from constructor to declaration (C++11)
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.
2020-05-14 10:01:56 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde 13a9bfbca7 Style: Harmonize header guards to style guide [Core] 2020-03-25 11:22:19 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Marcel Admiraal c2aa3e2351 Remove circular include between core/typedefs.h and core/error_macros.h 2019-10-08 11:03:57 +02:00
IAmActuallyCthulhu 82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Michael Alexsander Silva Dias 12ae7a4c02 Update some dead links in the codebase 2019-07-23 21:06:12 -03:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
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.
2018-09-12 09:52:22 +02:00
luz.paz 612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
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.
2018-01-05 01:22:23 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Cradmon 8da9fd5d23 Small fix in core/set.h and similar fix in core/map.h 2017-10-24 15:59:54 +01:00
Cradmon 98f8e7df16 Refactor core/map.h to be similar to core/set.h 2017-09-20 23:57:18 +01:00
Hein-Pieter van Braam 8230bf0a2f Remove assignment and declarations in if statements
After discussing with @reduz and @akien-mga it was decided that we do
not allow assignments or declarations in if statements. This PR removes
the instances of this I could find by automated means.
2017-09-08 14:59:15 +02:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Pedro J. Estébanez 211c451890 Implement well-defined handling of unrecoverable errors
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.
2017-07-05 09:31:44 +02:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
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
2017-03-05 16:44:50 +01:00
Rémi Verschelde f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00
Rémi Verschelde 93ab45b6b5 Style: Fix whole-line commented code
They do not play well with clang-format which aligns the `//` part
with the rest of the code block, thus producing badly indented commented code.
2017-01-14 14:52:23 +01:00
Rémi Verschelde c7bc44d5ad Welcome in 2017, dear changelog reader!
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!
2017-01-01 22:03:33 +01:00
Hubert Jarosz 4a4f247914
remove trailing whitespace 2016-03-09 00:00:52 +01:00
George Marques 5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
Juan Linietsky fdaa2920eb Updated copyright year in all headers 2015-04-18 14:38:54 -03:00
Juan Linietsky d7d65fa2f2 -improved physics ccd
-html5 exporter works again
-disable repeat on image loader by default
-can change shape offset en tileset, texture offset was broken
2014-02-19 11:57:14 -03:00
Juan Linietsky 0b806ee0fc GODOT IS OPEN SOURCE 2014-02-09 22:10:30 -03:00