summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/io/resource_importer.cpp12
-rw-r--r--core/io/resource_importer.h10
-rw-r--r--core/script_debugger_remote.cpp1
3 files changed, 12 insertions, 11 deletions
diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp
index ef834921b6..427ce2c2cd 100644
--- a/core/io/resource_importer.cpp
+++ b/core/io/resource_importer.cpp
@@ -32,7 +32,8 @@
#include "core/os/os.h"
#include "core/variant_parser.h"
-bool ResourceFormatImporter::SortImporterByName::operator() ( const Ref<ResourceImporter>& p_a,const Ref<ResourceImporter>& p_b) const {
+
+bool ResourceFormatImporter::SortImporterByName::operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const {
return p_a->get_importer_name() < p_b->get_importer_name();
}
@@ -321,7 +322,6 @@ Variant ResourceFormatImporter::get_resource_metadata(const String &p_path) cons
return pat.metadata;
}
-
void ResourceFormatImporter::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
PathAndType pat;
@@ -394,7 +394,7 @@ bool ResourceFormatImporter::are_import_settings_valid(const String &p_path) con
return false;
}
- for(int i=0;i<importers.size();i++) {
+ for (int i = 0; i < importers.size(); i++) {
if (importers[i]->get_importer_name() == pat.importer) {
if (!importers[i]->are_import_settings_valid(p_path)) { //importer thinks this is not valid
return false;
@@ -405,10 +405,10 @@ bool ResourceFormatImporter::are_import_settings_valid(const String &p_path) con
return true;
}
- String ResourceFormatImporter::get_import_settings_hash() const {
+String ResourceFormatImporter::get_import_settings_hash() const {
String hash;
- for(int i=0;i<importers.size();i++) {
- hash+=":"+importers[i]->get_importer_name()+":"+importers[i]->get_import_settings_string();
+ for (int i = 0; i < importers.size(); i++) {
+ hash += ":" + importers[i]->get_importer_name() + ":" + importers[i]->get_import_settings_string();
}
return hash.md5_text();
}
diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h
index 0ae6bf9090..db1befb51e 100644
--- a/core/io/resource_importer.h
+++ b/core/io/resource_importer.h
@@ -52,7 +52,7 @@ class ResourceFormatImporter : public ResourceFormatLoader {
//need them to stay in order to compute the settings hash
struct SortImporterByName {
- bool operator() ( const Ref<ResourceImporter>& p_a,const Ref<ResourceImporter>& p_b) const;
+ bool operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const;
};
Vector<Ref<ResourceImporter> > importers;
@@ -75,7 +75,10 @@ public:
String get_internal_resource_path(const String &p_path) const;
void get_internal_resource_path_list(const String &p_path, List<String> *r_paths);
- void add_importer(const Ref<ResourceImporter> &p_importer) { importers.push_back(p_importer); importers.sort_custom<SortImporterByName>();}
+ void add_importer(const Ref<ResourceImporter> &p_importer) {
+ importers.push_back(p_importer);
+ importers.sort_custom<SortImporterByName>();
+ }
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;
Ref<ResourceImporter> get_importer_by_extension(const String &p_extension) const;
@@ -117,10 +120,9 @@ public:
virtual void get_import_options(List<ImportOption> *r_options, int p_preset = 0) const = 0;
virtual bool get_option_visibility(const String &p_option, const Map<StringName, Variant> &p_options) const = 0;
- virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata=NULL) = 0;
+ virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL) = 0;
virtual bool are_import_settings_valid(const String &p_path) const { return true; }
virtual String get_import_settings_string() const { return String(); }
-
};
#endif // RESOURCE_IMPORTER_H
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 9780cc48ea..3ed25f118d 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -1054,7 +1054,6 @@ void ScriptDebuggerRemote::profiling_set_frame_times(float p_frame_time, float p
physics_frame_time = p_physics_frame_time;
}
-
ScriptDebuggerRemote::ResourceUsageFunc ScriptDebuggerRemote::resource_usage_func = NULL;
ScriptDebuggerRemote::ScriptDebuggerRemote() :