diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-17 07:33:00 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-17 07:36:24 +0100 |
commit | cb282c6ef0bb91957f8a6f422705813bd47c788c (patch) | |
tree | 7eba92b08fc89f46f1b7402b86372cfcc82486db /core/io | |
parent | c5d76139dc9c5721e09e0e782bed5ccf1789554b (diff) |
Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.
Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/config_file.cpp | 4 | ||||
-rw-r--r-- | core/io/config_file.h | 2 | ||||
-rw-r--r-- | core/io/file_access_memory.cpp | 6 | ||||
-rw-r--r-- | core/io/http_client.cpp | 2 | ||||
-rw-r--r-- | core/io/resource_importer.cpp | 4 | ||||
-rw-r--r-- | core/io/resource_importer.h | 6 | ||||
-rw-r--r-- | core/io/resource_loader.cpp | 4 | ||||
-rw-r--r-- | core/io/resource_loader.h | 2 | ||||
-rw-r--r-- | core/io/resource_saver.cpp | 2 |
9 files changed, 16 insertions, 16 deletions
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp index 531467ecd6..351e2941e8 100644 --- a/core/io/config_file.cpp +++ b/core/io/config_file.cpp @@ -107,7 +107,7 @@ bool ConfigFile::has_section_key(const String &p_section, const String &p_key) c void ConfigFile::get_sections(List<String> *r_sections) const { - for (OrderedHashMap<String, OrderedHashMap<String, Variant> >::ConstElement E = values.front(); E; E = E.next()) { + for (OrderedHashMap<String, OrderedHashMap<String, Variant>>::ConstElement E = values.front(); E; E = E.next()) { r_sections->push_back(E.key()); } } @@ -187,7 +187,7 @@ Error ConfigFile::save_encrypted_pass(const String &p_path, const String &p_pass Error ConfigFile::_internal_save(FileAccess *file) { - for (OrderedHashMap<String, OrderedHashMap<String, Variant> >::Element E = values.front(); E; E = E.next()) { + for (OrderedHashMap<String, OrderedHashMap<String, Variant>>::Element E = values.front(); E; E = E.next()) { if (E != values.front()) file->store_string("\n"); diff --git a/core/io/config_file.h b/core/io/config_file.h index 7efcb5a04c..39fc2ab412 100644 --- a/core/io/config_file.h +++ b/core/io/config_file.h @@ -40,7 +40,7 @@ class ConfigFile : public Reference { GDCLASS(ConfigFile, Reference); - OrderedHashMap<String, OrderedHashMap<String, Variant> > values; + OrderedHashMap<String, OrderedHashMap<String, Variant>> values; PackedStringArray _get_sections() const; PackedStringArray _get_section_keys(const String &p_section) const; diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp index fc318b3dd2..9e707678c0 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -35,12 +35,12 @@ #include "core/os/dir_access.h" #include "core/project_settings.h" -static Map<String, Vector<uint8_t> > *files = NULL; +static Map<String, Vector<uint8_t>> *files = NULL; void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) { if (!files) { - files = memnew((Map<String, Vector<uint8_t> >)); + files = memnew((Map<String, Vector<uint8_t>>)); } String name; @@ -89,7 +89,7 @@ Error FileAccessMemory::_open(const String &p_path, int p_mode_flags) { String name = fix_path(p_path); //name = DirAccess::normalize_path(name); - Map<String, Vector<uint8_t> >::Element *E = files->find(name); + Map<String, Vector<uint8_t>>::Element *E = files->find(name); ERR_FAIL_COND_V_MSG(!E, ERR_FILE_NOT_FOUND, "Can't find file '" + p_path + "'."); data = E->get().ptrw(); diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index ce7025de35..56f8f1ff91 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -350,7 +350,7 @@ Error HTTPClient::poll() { handshaking = true; } else { // We are already handshaking, which means we can use your already active SSL connection - ssl = static_cast<Ref<StreamPeerSSL> >(connection); + ssl = static_cast<Ref<StreamPeerSSL>>(connection); if (ssl.is_null()) { close(); status = STATUS_SSL_HANDSHAKE_ERROR; diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp index efaf958949..452514a588 100644 --- a/core/io/resource_importer.cpp +++ b/core/io/resource_importer.cpp @@ -362,7 +362,7 @@ Ref<ResourceImporter> ResourceFormatImporter::get_importer_by_name(const String return Ref<ResourceImporter>(); } -void ResourceFormatImporter::get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter> > *r_importers) { +void ResourceFormatImporter::get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter>> *r_importers) { for (int i = 0; i < importers.size(); i++) { List<String> local_exts; @@ -423,7 +423,7 @@ bool ResourceFormatImporter::are_import_settings_valid(const String &p_path) con String ResourceFormatImporter::get_import_settings_hash() const { - Vector<Ref<ResourceImporter> > sorted_importers = importers; + Vector<Ref<ResourceImporter>> sorted_importers = importers; sorted_importers.sort_custom<SortImporterByName>(); diff --git a/core/io/resource_importer.h b/core/io/resource_importer.h index 65c148f2ac..369efbe83c 100644 --- a/core/io/resource_importer.h +++ b/core/io/resource_importer.h @@ -54,7 +54,7 @@ class ResourceFormatImporter : public ResourceFormatLoader { bool operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const; }; - Vector<Ref<ResourceImporter> > importers; + Vector<Ref<ResourceImporter>> importers; public: static ResourceFormatImporter *get_singleton() { return singleton; } @@ -83,7 +83,7 @@ public: 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; - void get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter> > *r_importers); + void get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter>> *r_importers); bool are_import_settings_valid(const String &p_path) const; String get_import_settings_hash() const; @@ -125,7 +125,7 @@ public: 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_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant> > &p_source_file_options, const Map<String, String> &p_base_paths) { return ERR_UNAVAILABLE; } + virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) { return ERR_UNAVAILABLE; } virtual bool are_import_settings_valid(const String &p_path) const { return true; } virtual String get_import_settings_string() const { return String(); } }; diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 5dca8b3b89..b150df5f40 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -1113,7 +1113,7 @@ void ResourceLoader::add_custom_loaders() { void ResourceLoader::remove_custom_loaders() { - Vector<Ref<ResourceFormatLoader> > custom_loaders; + Vector<Ref<ResourceFormatLoader>> custom_loaders; for (int i = 0; i < loader_count; ++i) { if (loader[i]->get_script_instance()) { custom_loaders.push_back(loader[i]); @@ -1159,7 +1159,7 @@ int ResourceLoader::thread_suspended_count = 0; int ResourceLoader::thread_load_max = 0; SelfList<Resource>::List ResourceLoader::remapped_list; -HashMap<String, Vector<String> > ResourceLoader::translation_remaps; +HashMap<String, Vector<String>> ResourceLoader::translation_remaps; HashMap<String, String> ResourceLoader::path_remaps; ResourceLoaderImport ResourceLoader::import = NULL; diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h index ea89917a5f..5ba9e26858 100644 --- a/core/io/resource_loader.h +++ b/core/io/resource_loader.h @@ -90,7 +90,7 @@ private: static void *dep_err_notify_ud; static DependencyErrorNotify dep_err_notify; static bool abort_on_missing_resource; - static HashMap<String, Vector<String> > translation_remaps; + static HashMap<String, Vector<String>> translation_remaps; static HashMap<String, String> path_remaps; static String _path_remap(const String &p_path, bool *r_translation_remapped = NULL); diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp index 740aaf5cfa..80d2c5e471 100644 --- a/core/io/resource_saver.cpp +++ b/core/io/resource_saver.cpp @@ -256,7 +256,7 @@ void ResourceSaver::add_custom_savers() { void ResourceSaver::remove_custom_savers() { - Vector<Ref<ResourceFormatSaver> > custom_savers; + Vector<Ref<ResourceFormatSaver>> custom_savers; for (int i = 0; i < saver_count; ++i) { if (saver[i]->get_script_instance()) { custom_savers.push_back(saver[i]); |