Style: Re-apply clang-format over recent invalid additions

This commit is contained in:
Rémi Verschelde 2017-12-10 01:27:02 +01:00
parent 7cb6e6b723
commit a845411454
12 changed files with 18 additions and 18 deletions

View File

@ -43,7 +43,7 @@ const char *JSON::tk_name[TK_MAX] = {
"EOF", "EOF",
}; };
static String _make_indent(const String& p_indent, int p_size) { static String _make_indent(const String &p_indent, int p_size) {
String indent_text = ""; String indent_text = "";
if (!p_indent.empty()) { if (!p_indent.empty()) {
@ -53,7 +53,7 @@ static String _make_indent(const String& p_indent, int p_size) {
return indent_text; return indent_text;
} }
String JSON::_print_var(const Variant &p_var, const String& p_indent, int p_cur_indent, bool p_sort_keys) { String JSON::_print_var(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys) {
String colon = ":"; String colon = ":";
String end_statement = ""; String end_statement = "";
@ -116,7 +116,7 @@ String JSON::_print_var(const Variant &p_var, const String& p_indent, int p_cur_
} }
} }
String JSON::print(const Variant &p_var, const String& p_indent, bool p_sort_keys) { String JSON::print(const Variant &p_var, const String &p_indent, bool p_sort_keys) {
return _print_var(p_var, p_indent, 0, p_sort_keys); return _print_var(p_var, p_indent, 0, p_sort_keys);
} }

View File

@ -64,7 +64,7 @@ class JSON {
static const char *tk_name[TK_MAX]; static const char *tk_name[TK_MAX];
static String _print_var(const Variant &p_var, const String& p_indent, int p_cur_indent, bool p_sort_keys); static String _print_var(const Variant &p_var, const String &p_indent, int p_cur_indent, bool p_sort_keys);
static Error _get_token(const CharType *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str); static Error _get_token(const CharType *p_str, int &index, int p_len, Token &r_token, int &line, String &r_err_str);
static Error _parse_value(Variant &value, Token &token, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str); static Error _parse_value(Variant &value, Token &token, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str);
@ -72,7 +72,7 @@ class JSON {
static Error _parse_object(Dictionary &object, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str); static Error _parse_object(Dictionary &object, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str);
public: public:
static String print(const Variant &p_var, const String& p_indent = "", bool p_sort_keys = true); static String print(const Variant &p_var, const String &p_indent = "", bool p_sort_keys = true);
static Error parse(const String &p_json, Variant &r_ret, String &r_err_str, int &r_err_line); static Error parse(const String &p_json, Variant &r_ret, String &r_err_str, int &r_err_line);
}; };

View File

@ -202,8 +202,9 @@ class EditorHelpSearch::IncrementalSearch : public Reference {
} }
public: public:
IncrementalSearch(EditorHelpSearch *p_search, Tree *p_search_options, const String &p_term) IncrementalSearch(EditorHelpSearch *p_search, Tree *p_search_options, const String &p_term) :
: search(p_search), search_options(p_search_options) { search(p_search),
search_options(p_search_options) {
def_icon = search->get_icon("Node", "EditorIcons"); def_icon = search->get_icon("Node", "EditorIcons");
doc = EditorHelp::get_doc_data(); doc = EditorHelp::get_doc_data();

View File

@ -3366,7 +3366,6 @@ void EditorNode::register_editor_types() {
ClassDB::register_class<EditorResourceConversionPlugin>(); ClassDB::register_class<EditorResourceConversionPlugin>();
ClassDB::register_class<EditorSceneImporter>(); ClassDB::register_class<EditorSceneImporter>();
// FIXME: Is this stuff obsolete, or should it be ported to new APIs? // FIXME: Is this stuff obsolete, or should it be ported to new APIs?
ClassDB::register_class<EditorScenePostImport>(); ClassDB::register_class<EditorScenePostImport>();
//ClassDB::register_type<EditorImportExport>(); //ClassDB::register_type<EditorImportExport>();

View File

@ -31,11 +31,11 @@
#define EDITOR_PLUGIN_H #define EDITOR_PLUGIN_H
#include "editor/import/editor_import_plugin.h" #include "editor/import/editor_import_plugin.h"
#include "editor/import/resource_importer_scene.h"
#include "io/config_file.h" #include "io/config_file.h"
#include "scene/gui/tool_button.h" #include "scene/gui/tool_button.h"
#include "scene/main/node.h" #include "scene/main/node.h"
#include "scene/resources/texture.h" #include "scene/resources/texture.h"
#include "editor/import/resource_importer_scene.h"
#include "undo_redo.h" #include "undo_redo.h"
/** /**

View File

@ -1979,7 +1979,7 @@ Node *EditorSceneImporterCollada::import_scene(const String &p_path, uint32_t p_
return state.scene; return state.scene;
} }
Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path, uint32_t p_flags,int p_bake_fps) { Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps) {
ColladaImport state; ColladaImport state;

View File

@ -40,7 +40,7 @@ public:
virtual uint32_t get_import_flags() const; virtual uint32_t get_import_flags() const;
virtual void get_extensions(List<String> *r_extensions) const; virtual void get_extensions(List<String> *r_extensions) const;
virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = NULL, Error *r_err = NULL); virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = NULL, Error *r_err = NULL);
virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags,int p_bake_fps); virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps);
EditorSceneImporterCollada(); EditorSceneImporterCollada();
}; };

View File

@ -296,7 +296,7 @@ public:
virtual uint32_t get_import_flags() const; virtual uint32_t get_import_flags() const;
virtual void get_extensions(List<String> *r_extensions) const; virtual void get_extensions(List<String> *r_extensions) const;
virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = NULL, Error *r_err = NULL); virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps = NULL, Error *r_err = NULL);
virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags,int p_bake_fps); virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps);
EditorSceneImporterGLTF(); EditorSceneImporterGLTF();
}; };

View File

@ -40,7 +40,7 @@ public:
virtual uint32_t get_import_flags() const; virtual uint32_t get_import_flags() const;
virtual void get_extensions(List<String> *r_extensions) const; virtual void get_extensions(List<String> *r_extensions) const;
virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = NULL); virtual Node *import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err = NULL);
virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags,int p_bake_fps); virtual Ref<Animation> import_animation(const String &p_path, uint32_t p_flags, int p_bake_fps);
EditorOBJImporter(); EditorOBJImporter();
}; };

View File

@ -515,7 +515,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
} else { } else {
v = "of type '" + _get_var_type(index) + "'"; v = "of type '" + _get_var_type(index) + "'";
} }
err_text = "Invalid set index " + v + " (on base: '" + _get_var_type(dst) + "') with value of type '"+_get_var_type(value)+"'"; err_text = "Invalid set index " + v + " (on base: '" + _get_var_type(dst) + "') with value of type '" + _get_var_type(value) + "'";
OPCODE_BREAK; OPCODE_BREAK;
} }
#endif #endif
@ -574,7 +574,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
#ifdef DEBUG_ENABLED #ifdef DEBUG_ENABLED
if (!valid) { if (!valid) {
String err_type; String err_type;
err_text = "Invalid set index '" + String(*index) + "' (on base: '" + _get_var_type(dst) + "') with value of type '"+_get_var_type(value)+"'."; err_text = "Invalid set index '" + String(*index) + "' (on base: '" + _get_var_type(dst) + "') with value of type '" + _get_var_type(value) + "'.";
OPCODE_BREAK; OPCODE_BREAK;
} }
#endif #endif

View File

@ -1286,7 +1286,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug) {
Ref<GIProbeData> probe_data = get_probe_data(); Ref<GIProbeData> probe_data = get_probe_data();
if(probe_data.is_null()) if (probe_data.is_null())
probe_data.instance(); probe_data.instance();
probe_data->set_bounds(AABB(-extents, extents * 2.0)); probe_data->set_bounds(AABB(-extents, extents * 2.0));

View File

@ -1189,7 +1189,7 @@ void ParticlesMaterial::set_flag(Flags p_flag, bool p_enable) {
ERR_FAIL_INDEX(p_flag, FLAG_MAX); ERR_FAIL_INDEX(p_flag, FLAG_MAX);
flags[p_flag] = p_enable; flags[p_flag] = p_enable;
_queue_shader_change(); _queue_shader_change();
if (p_flag==FLAG_DISABLE_Z) { if (p_flag == FLAG_DISABLE_Z) {
_change_notify(); _change_notify();
} }
} }
@ -1379,7 +1379,7 @@ void ParticlesMaterial::_validate_property(PropertyInfo &property) const {
} }
if (property.name.begins_with("orbit_") && !flags[FLAG_DISABLE_Z]) { if (property.name.begins_with("orbit_") && !flags[FLAG_DISABLE_Z]) {
property.usage=0; property.usage = 0;
} }
} }