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
This commit is contained in:
Rémi Verschelde
2017-03-05 16:44:50 +01:00
parent 45438e9918
commit 5dbf1809c6
1318 changed files with 140051 additions and 166004 deletions

View File

@ -32,7 +32,7 @@
void Engine::set_iterations_per_second(int p_ips) {
ips=p_ips;
ips = p_ips;
}
int Engine::get_iterations_per_second() const {
@ -40,7 +40,7 @@ int Engine::get_iterations_per_second() const {
}
void Engine::set_target_fps(int p_fps) {
_target_fps=p_fps>0? p_fps : 0;
_target_fps = p_fps > 0 ? p_fps : 0;
}
float Engine::get_target_fps() const {
@ -54,7 +54,7 @@ uint64_t Engine::get_frames_drawn() {
void Engine::set_frame_delay(uint32_t p_msec) {
_frame_delay=p_msec;
_frame_delay = p_msec;
}
uint32_t Engine::get_frame_delay() const {
@ -64,7 +64,7 @@ uint32_t Engine::get_frame_delay() const {
void Engine::set_time_scale(float p_scale) {
_time_scale=p_scale;
_time_scale = p_scale;
}
float Engine::get_time_scale() const {
@ -77,11 +77,11 @@ Dictionary Engine::get_version_info() const {
Dictionary dict;
dict["major"] = VERSION_MAJOR;
dict["minor"] = VERSION_MINOR;
#ifdef VERSION_PATCH
#ifdef VERSION_PATCH
dict["patch"] = VERSION_PATCH;
#else
#else
dict["patch"] = 0;
#endif
#endif
dict["status"] = _MKSTR(VERSION_STATUS);
dict["revision"] = _MKSTR(VERSION_REVISION);
dict["year"] = VERSION_YEAR;
@ -95,25 +95,23 @@ Dictionary Engine::get_version_info() const {
return dict;
}
Engine *Engine::singleton=NULL;
Engine *Engine::singleton = NULL;
Engine *Engine::get_singleton() {
return singleton;
}
Engine::Engine()
{
Engine::Engine() {
singleton=this;
frames_drawn=0;
ips=60;
_frame_delay=0;
_fps=1;
_target_fps=0;
_time_scale=1.0;
_pixel_snap=false;
_fixed_frames=0;
_idle_frames=0;
_in_fixed=false;
singleton = this;
frames_drawn = 0;
ips = 60;
_frame_delay = 0;
_fps = 1;
_target_fps = 0;
_time_scale = 1.0;
_pixel_snap = false;
_fixed_frames = 0;
_idle_frames = 0;
_in_fixed = false;
}