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

@ -29,18 +29,18 @@
#ifndef PROJECT_MANAGER_H
#define PROJECT_MANAGER_H
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
#include "scene/gui/scroll_container.h"
#include "scene/gui/file_dialog.h"
#include "scene/gui/tool_button.h"
#include "editor/asset_library_editor_plugin.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/file_dialog.h"
#include "scene/gui/scroll_container.h"
#include "scene/gui/tool_button.h"
#include "scene/gui/tree.h"
class NewProjectDialog;
class ProjectListFilter;
class ProjectManager : public Control {
GDCLASS( ProjectManager, Control );
GDCLASS(ProjectManager, Control);
Button *erase_btn;
Button *open_btn;
@ -69,8 +69,6 @@ class ProjectManager : public Control {
Control *gui_base;
void _scan_projects();
void _run_project();
void _run_project_confirm();
@ -82,26 +80,26 @@ class ProjectManager : public Control {
void _erase_project_confirm();
void _update_project_buttons();
void _exit_dialog();
void _scan_begin(const String& p_base);
void _scan_begin(const String &p_base);
void _load_recent_projects();
void _on_project_created(const String& dir);
void _update_scroll_pos(const String& dir);
void _scan_dir(DirAccess *da,float pos, float total,List<String> *r_projects);
void _on_project_created(const String &dir);
void _update_scroll_pos(const String &dir);
void _scan_dir(DirAccess *da, float pos, float total, List<String> *r_projects);
void _install_project(const String& p_zip_path,const String& p_title);
void _install_project(const String &p_zip_path, const String &p_title);
void _panel_draw(Node *p_hb);
void _panel_input(const InputEvent& p_ev,Node *p_hb);
void _unhandled_input(const InputEvent& p_ev);
void _panel_input(const InputEvent &p_ev, Node *p_hb);
void _unhandled_input(const InputEvent &p_ev);
void _favorite_pressed(Node *p_hb);
void _files_dropped(PoolStringArray p_files, int p_screen);
void _scan_multiple_folders(PoolStringArray p_files);
protected:
void _notification(int p_what);
static void _bind_methods();
public:
ProjectManager();
~ProjectManager();
@ -109,10 +107,9 @@ public:
class ProjectListFilter : public HBoxContainer {
GDCLASS( ProjectListFilter, HBoxContainer );
GDCLASS(ProjectListFilter, HBoxContainer);
private:
friend class ProjectManager;
enum Command {
@ -130,7 +127,7 @@ private:
FilterOption _current_filter;
void _command(int p_command);
void _search_text_changed(const String& p_newtext);
void _search_text_changed(const String &p_newtext);
void _setup_filters();
void _filter_option_selected(int p_idx);
@ -139,7 +136,6 @@ protected:
static void _bind_methods();
public:
String get_search_term();
FilterOption get_filter_option();
ProjectListFilter();