From cb282c6ef0bb91957f8a6f422705813bd47c788c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 17 Mar 2020 07:33:00 +0100 Subject: Style: Set clang-format Standard to Cpp11 For us, it practically only changes the fact that `A>` is now used instead of the C++03 compatible `A >`. 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`. --- core/bind/core_bind.cpp | 26 +++++++++++++------------- core/class_db.cpp | 2 +- core/class_db.h | 4 ++-- core/compressed_translation.cpp | 6 +++--- core/debugger/local_debugger.cpp | 4 ++-- core/debugger/script_debugger.h | 4 ++-- core/input_map.cpp | 14 +++++++------- core/input_map.h | 6 +++--- core/io/config_file.cpp | 4 ++-- core/io/config_file.h | 2 +- core/io/file_access_memory.cpp | 6 +++--- core/io/http_client.cpp | 2 +- core/io/resource_importer.cpp | 4 ++-- core/io/resource_importer.h | 6 +++--- core/io/resource_loader.cpp | 4 ++-- core/io/resource_loader.h | 2 +- core/io/resource_saver.cpp | 2 +- core/list.h | 4 ++-- core/math/geometry.cpp | 18 +++++++++--------- core/math/geometry.h | 26 +++++++++++++------------- core/method_ptrcall.h | 10 +++++----- core/oa_hash_map.h | 2 +- core/ordered_hash_map.h | 2 +- core/os/mutex.cpp | 4 ++-- core/os/mutex.h | 4 ++-- core/os/threaded_array_processor.h | 2 +- core/project_settings.cpp | 12 ++++++------ core/project_settings.h | 4 ++-- core/reference.h | 4 ++-- core/resource.cpp | 8 ++++---- core/resource.h | 8 ++++---- core/script_language.cpp | 2 +- core/script_language.h | 4 ++-- core/translation.cpp | 6 +++--- core/translation.h | 2 +- core/type_info.h | 2 +- core/variant.cpp | 36 ++++++++++++++++++------------------ core/vector.h | 2 +- 38 files changed, 130 insertions(+), 130 deletions(-) (limited to 'core') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index bfe07d61c5..e7a1f8b2ee 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -964,10 +964,10 @@ void _OS::print_all_textures_by_size() { List<_OSCoreBindImg> imgs; int total = 0; { - List > rsrc; + List> rsrc; ResourceCache::get_cached_resources(&rsrc); - for (List >::Element *E = rsrc.front(); E; E = E->next()) { + for (List>::Element *E = rsrc.front(); E; E = E->next()) { if (!E->get()->is_class("ImageTexture")) continue; @@ -998,13 +998,13 @@ void _OS::print_resources_by_type(const Vector &p_types) { Map type_count; - List > resources; + List> resources; ResourceCache::get_cached_resources(&resources); - List > rsrc; + List> rsrc; ResourceCache::get_cached_resources(&rsrc); - for (List >::Element *E = rsrc.front(); E; E = E->next()) { + for (List>::Element *E = rsrc.front(); E; E = E->next()) { Ref r = E->get(); @@ -1633,7 +1633,7 @@ Vector _Geometry::clip_polygon(const Vector &p_points, const P Array _Geometry::merge_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { - Vector > polys = Geometry::merge_polygons_2d(p_polygon_a, p_polygon_b); + Vector> polys = Geometry::merge_polygons_2d(p_polygon_a, p_polygon_b); Array ret; @@ -1645,7 +1645,7 @@ Array _Geometry::merge_polygons_2d(const Vector &p_polygon_a, const Vec Array _Geometry::clip_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { - Vector > polys = Geometry::clip_polygons_2d(p_polygon_a, p_polygon_b); + Vector> polys = Geometry::clip_polygons_2d(p_polygon_a, p_polygon_b); Array ret; @@ -1657,7 +1657,7 @@ Array _Geometry::clip_polygons_2d(const Vector &p_polygon_a, const Vect Array _Geometry::intersect_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { - Vector > polys = Geometry::intersect_polygons_2d(p_polygon_a, p_polygon_b); + Vector> polys = Geometry::intersect_polygons_2d(p_polygon_a, p_polygon_b); Array ret; @@ -1669,7 +1669,7 @@ Array _Geometry::intersect_polygons_2d(const Vector &p_polygon_a, const Array _Geometry::exclude_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { - Vector > polys = Geometry::exclude_polygons_2d(p_polygon_a, p_polygon_b); + Vector> polys = Geometry::exclude_polygons_2d(p_polygon_a, p_polygon_b); Array ret; @@ -1681,7 +1681,7 @@ Array _Geometry::exclude_polygons_2d(const Vector &p_polygon_a, const V Array _Geometry::clip_polyline_with_polygon_2d(const Vector &p_polyline, const Vector &p_polygon) { - Vector > polys = Geometry::clip_polyline_with_polygon_2d(p_polyline, p_polygon); + Vector> polys = Geometry::clip_polyline_with_polygon_2d(p_polyline, p_polygon); Array ret; @@ -1693,7 +1693,7 @@ Array _Geometry::clip_polyline_with_polygon_2d(const Vector &p_polyline Array _Geometry::intersect_polyline_with_polygon_2d(const Vector &p_polyline, const Vector &p_polygon) { - Vector > polys = Geometry::intersect_polyline_with_polygon_2d(p_polyline, p_polygon); + Vector> polys = Geometry::intersect_polyline_with_polygon_2d(p_polyline, p_polygon); Array ret; @@ -1705,7 +1705,7 @@ Array _Geometry::intersect_polyline_with_polygon_2d(const Vector &p_pol Array _Geometry::offset_polygon_2d(const Vector &p_polygon, real_t p_delta, PolyJoinType p_join_type) { - Vector > polys = Geometry::offset_polygon_2d(p_polygon, p_delta, Geometry::PolyJoinType(p_join_type)); + Vector> polys = Geometry::offset_polygon_2d(p_polygon, p_delta, Geometry::PolyJoinType(p_join_type)); Array ret; @@ -1717,7 +1717,7 @@ Array _Geometry::offset_polygon_2d(const Vector &p_polygon, real_t p_de Array _Geometry::offset_polyline_2d(const Vector &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) { - Vector > polys = Geometry::offset_polyline_2d(p_polygon, p_delta, Geometry::PolyJoinType(p_join_type), Geometry::PolyEndType(p_end_type)); + Vector> polys = Geometry::offset_polyline_2d(p_polygon, p_delta, Geometry::PolyJoinType(p_join_type), Geometry::PolyEndType(p_end_type)); Array ret; diff --git a/core/class_db.cpp b/core/class_db.cpp index 35e216a58f..50c924bdd2 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -1401,7 +1401,7 @@ void ClassDB::get_extensions_for_type(const StringName &p_class, List *p } } -HashMap > ClassDB::default_values; +HashMap> ClassDB::default_values; Set ClassDB::default_values_cached; Variant ClassDB::class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid) { diff --git a/core/class_db.h b/core/class_db.h index 398eca9132..35bbe6b6f5 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -119,7 +119,7 @@ public: void *class_ptr; HashMap method_map; HashMap constant_map; - HashMap > enum_map; + HashMap> enum_map; HashMap signal_map; List property_list; #ifdef DEBUG_METHODS_ENABLED @@ -160,7 +160,7 @@ public: static void _add_class2(const StringName &p_class, const StringName &p_inherits); - static HashMap > default_values; + static HashMap> default_values; static Set default_values_cached; public: diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp index ed307fd3ac..0225524bc8 100644 --- a/core/compressed_translation.cpp +++ b/core/compressed_translation.cpp @@ -50,8 +50,8 @@ void PHashTranslation::generate(const Ref &p_from) { int size = Math::larger_prime(keys.size()); - Vector > > buckets; - Vector > table; + Vector>> buckets; + Vector> table; Vector hfunc_table; Vector<_PHashTranslationCmp> compressed; @@ -109,7 +109,7 @@ void PHashTranslation::generate(const Ref &p_from) { for (int i = 0; i < size; i++) { - const Vector > &b = buckets[i]; + const Vector> &b = buckets[i]; Map &t = table.write[i]; if (b.size() == 0) diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp index 913d3fc031..01e30fb621 100644 --- a/core/debugger/local_debugger.cpp +++ b/core/debugger/local_debugger.cpp @@ -262,14 +262,14 @@ void LocalDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) { if (line.get_slice_count(" ") <= 1) { - const Map > &breakpoints = script_debugger->get_breakpoints(); + const Map> &breakpoints = script_debugger->get_breakpoints(); if (breakpoints.size() == 0) { print_line("No Breakpoints."); continue; } print_line("Breakpoint(s): " + itos(breakpoints.size())); - for (Map >::Element *E = breakpoints.front(); E; E = E->next()) { + for (Map>::Element *E = breakpoints.front(); E; E = E->next()) { print_line("\t" + String(E->value().front()->get()) + ":" + itos(E->key())); } diff --git a/core/debugger/script_debugger.h b/core/debugger/script_debugger.h index d8ddf353bf..2273073bf4 100644 --- a/core/debugger/script_debugger.h +++ b/core/debugger/script_debugger.h @@ -45,7 +45,7 @@ class ScriptDebugger { int depth = -1; bool skip_breakpoints = false; - Map > breakpoints; + Map> breakpoints; ScriptLanguage *break_lang = NULL; Vector error_stack_info; @@ -67,7 +67,7 @@ public: bool is_breakpoint(int p_line, const StringName &p_source) const; bool is_breakpoint_line(int p_line) const; void clear_breakpoints(); - const Map > &get_breakpoints() const { return breakpoints; } + const Map> &get_breakpoints() const { return breakpoints; } void debug(ScriptLanguage *p_lang, bool p_can_continue = true, bool p_is_error_breakpoint = false); ScriptLanguage *get_break_language() const; diff --git a/core/input_map.cpp b/core/input_map.cpp index b855e14e0d..8f18c082d6 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -99,9 +99,9 @@ List InputMap::get_actions() const { return actions; } -List >::Element *InputMap::_find_event(Action &p_action, const Ref &p_event, bool *p_pressed, float *p_strength) const { +List>::Element *InputMap::_find_event(Action &p_action, const Ref &p_event, bool *p_pressed, float *p_strength) const { - for (List >::Element *E = p_action.inputs.front(); E; E = E->next()) { + for (List>::Element *E = p_action.inputs.front(); E; E = E->next()) { const Ref e = E->get(); @@ -151,7 +151,7 @@ void InputMap::action_erase_event(const StringName &p_action, const Ref >::Element *E = _find_event(input_map[p_action], p_event); + List>::Element *E = _find_event(input_map[p_action], p_event); if (E) input_map[p_action].inputs.erase(E); } @@ -166,9 +166,9 @@ void InputMap::action_erase_events(const StringName &p_action) { Array InputMap::_get_action_list(const StringName &p_action) { Array ret; - const List > *al = get_action_list(p_action); + const List> *al = get_action_list(p_action); if (al) { - for (const List >::Element *E = al->front(); E; E = E->next()) { + for (const List>::Element *E = al->front(); E; E = E->next()) { ret.push_back(E->get()); } @@ -177,7 +177,7 @@ Array InputMap::_get_action_list(const StringName &p_action) { return ret; } -const List > *InputMap::get_action_list(const StringName &p_action) { +const List> *InputMap::get_action_list(const StringName &p_action) { const Map::Element *E = input_map.find(p_action); if (!E) @@ -205,7 +205,7 @@ bool InputMap::event_get_action_status(const Ref &p_event, const Str bool pressed; float strength; - List >::Element *event = _find_event(E->get(), p_event, &pressed, &strength); + List>::Element *event = _find_event(E->get(), p_event, &pressed, &strength); if (event != NULL) { if (p_pressed != NULL) *p_pressed = pressed; diff --git a/core/input_map.h b/core/input_map.h index 19d550af77..6039d915c9 100644 --- a/core/input_map.h +++ b/core/input_map.h @@ -47,7 +47,7 @@ public: struct Action { int id; float deadzone; - List > inputs; + List> inputs; }; private: @@ -55,7 +55,7 @@ private: mutable Map input_map; - List >::Element *_find_event(Action &p_action, const Ref &p_event, bool *p_pressed = NULL, float *p_strength = NULL) const; + List>::Element *_find_event(Action &p_action, const Ref &p_event, bool *p_pressed = NULL, float *p_strength = NULL) const; Array _get_action_list(const StringName &p_action); Array _get_actions(); @@ -77,7 +77,7 @@ public: void action_erase_event(const StringName &p_action, const Ref &p_event); void action_erase_events(const StringName &p_action); - const List > *get_action_list(const StringName &p_action); + const List> *get_action_list(const StringName &p_action); bool event_is_action(const Ref &p_event, const StringName &p_action) const; bool event_get_action_status(const Ref &p_event, const StringName &p_action, bool *p_pressed = NULL, float *p_strength = NULL) const; 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 *r_sections) const { - for (OrderedHashMap >::ConstElement E = values.front(); E; E = E.next()) { + for (OrderedHashMap>::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 >::Element E = values.front(); E; E = E.next()) { + for (OrderedHashMap>::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 > values; + OrderedHashMap> 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 > *files = NULL; +static Map> *files = NULL; void FileAccessMemory::register_file(String p_name, Vector p_data) { if (!files) { - files = memnew((Map >)); + files = memnew((Map>)); } 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 >::Element *E = files->find(name); + Map>::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 >(connection); + ssl = static_cast>(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 ResourceFormatImporter::get_importer_by_name(const String return Ref(); } -void ResourceFormatImporter::get_importers_for_extension(const String &p_extension, List > *r_importers) { +void ResourceFormatImporter::get_importers_for_extension(const String &p_extension, List> *r_importers) { for (int i = 0; i < importers.size(); i++) { List 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 > sorted_importers = importers; + Vector> sorted_importers = importers; sorted_importers.sort_custom(); 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 &p_a, const Ref &p_b) const; }; - Vector > importers; + Vector> importers; public: static ResourceFormatImporter *get_singleton() { return singleton; } @@ -83,7 +83,7 @@ public: void remove_importer(const Ref &p_importer) { importers.erase(p_importer); } Ref get_importer_by_name(const String &p_name) const; Ref get_importer_by_extension(const String &p_extension) const; - void get_importers_for_extension(const String &p_extension, List > *r_importers); + void get_importers_for_extension(const String &p_extension, List> *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 &p_options, List *r_platform_variants, List *r_gen_files = NULL, Variant *r_metadata = NULL) = 0; - virtual Error import_group_file(const String &p_group_file, const Map > &p_source_file_options, const Map &p_base_paths) { return ERR_UNAVAILABLE; } + virtual Error import_group_file(const String &p_group_file, const Map> &p_source_file_options, const Map &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 > custom_loaders; + Vector> 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::List ResourceLoader::remapped_list; -HashMap > ResourceLoader::translation_remaps; +HashMap> ResourceLoader::translation_remaps; HashMap 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 > translation_remaps; + static HashMap> translation_remaps; static HashMap 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 > custom_savers; + Vector> custom_savers; for (int i = 0; i < saver_count; ++i) { if (saver[i]->get_script_instance()) { custom_savers.push_back(saver[i]); diff --git a/core/list.h b/core/list.h index 6250cec598..5a7c9e572c 100644 --- a/core/list.h +++ b/core/list.h @@ -576,7 +576,7 @@ public: void sort() { - sort_custom >(); + sort_custom>(); } template @@ -657,7 +657,7 @@ public: idx++; } - SortArray > sort; + SortArray> sort; sort.sort(aux_buffer, s); _data->first = aux_buffer[0]; diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index 69c7abfd30..3e07e9253e 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -214,9 +214,9 @@ static bool _group_face(_FaceClassify *p_faces, int len, int p_index, int p_grou return true; } -Vector > Geometry::separate_objects(Vector p_array) { +Vector> Geometry::separate_objects(Vector p_array) { - Vector > objects; + Vector> objects; int len = p_array.size(); @@ -235,7 +235,7 @@ Vector > Geometry::separate_objects(Vector p_array) { bool error = _connect_faces(_fcptr, len, -1); - ERR_FAIL_COND_V_MSG(error, Vector >(), "Invalid geometry."); + ERR_FAIL_COND_V_MSG(error, Vector>(), "Invalid geometry."); // Group connected faces in separate objects. @@ -679,8 +679,8 @@ Vector Geometry::wrap_geometry(Vector p_array, real_t *p_error) { return wrapped_faces; } -Vector > Geometry::decompose_polygon_in_convex(Vector polygon) { - Vector > decomp; +Vector> Geometry::decompose_polygon_in_convex(Vector polygon) { + Vector> decomp; List in_poly, out_poly; TriangulatorPoly inp; @@ -1076,7 +1076,7 @@ void Geometry::make_atlas(const Vector &p_rects, Vector &r_resu r_size = Size2(results[best].max_w, results[best].max_h); } -Vector > Geometry::_polypaths_do_operation(PolyBooleanOperation p_op, const Vector &p_polypath_a, const Vector &p_polypath_b, bool is_a_open) { +Vector> Geometry::_polypaths_do_operation(PolyBooleanOperation p_op, const Vector &p_polypath_a, const Vector &p_polypath_b, bool is_a_open) { using namespace ClipperLib; @@ -1111,7 +1111,7 @@ Vector > Geometry::_polypaths_do_operation(PolyBooleanOperation p clp.Execute(op, paths); // Works on closed polygons only. } // Have to scale points down now. - Vector > polypaths; + Vector> polypaths; for (Paths::size_type i = 0; i < paths.size(); ++i) { Vector polypath; @@ -1128,7 +1128,7 @@ Vector > Geometry::_polypaths_do_operation(PolyBooleanOperation p return polypaths; } -Vector > Geometry::_polypath_offset(const Vector &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) { +Vector> Geometry::_polypath_offset(const Vector &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) { using namespace ClipperLib; @@ -1162,7 +1162,7 @@ Vector > Geometry::_polypath_offset(const Vector &p_polyp co.Execute(paths, p_delta * SCALE_FACTOR); // Inflate/deflate. // Have to scale points down now. - Vector > polypaths; + Vector> polypaths; for (Paths::size_type i = 0; i < paths.size(); ++i) { Vector polypath; diff --git a/core/math/geometry.h b/core/math/geometry.h index a94d00bf77..6453d16181 100644 --- a/core/math/geometry.h +++ b/core/math/geometry.h @@ -790,44 +790,44 @@ public: END_ROUND }; - static Vector > merge_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { + static Vector> merge_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { return _polypaths_do_operation(OPERATION_UNION, p_polygon_a, p_polygon_b); } - static Vector > clip_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { + static Vector> clip_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { return _polypaths_do_operation(OPERATION_DIFFERENCE, p_polygon_a, p_polygon_b); } - static Vector > intersect_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { + static Vector> intersect_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { return _polypaths_do_operation(OPERATION_INTERSECTION, p_polygon_a, p_polygon_b); } - static Vector > exclude_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { + static Vector> exclude_polygons_2d(const Vector &p_polygon_a, const Vector &p_polygon_b) { return _polypaths_do_operation(OPERATION_XOR, p_polygon_a, p_polygon_b); } - static Vector > clip_polyline_with_polygon_2d(const Vector &p_polyline, const Vector &p_polygon) { + static Vector> clip_polyline_with_polygon_2d(const Vector &p_polyline, const Vector &p_polygon) { return _polypaths_do_operation(OPERATION_DIFFERENCE, p_polyline, p_polygon, true); } - static Vector > intersect_polyline_with_polygon_2d(const Vector &p_polyline, const Vector &p_polygon) { + static Vector> intersect_polyline_with_polygon_2d(const Vector &p_polyline, const Vector &p_polygon) { return _polypaths_do_operation(OPERATION_INTERSECTION, p_polyline, p_polygon, true); } - static Vector > offset_polygon_2d(const Vector &p_polygon, real_t p_delta, PolyJoinType p_join_type) { + static Vector> offset_polygon_2d(const Vector &p_polygon, real_t p_delta, PolyJoinType p_join_type) { return _polypath_offset(p_polygon, p_delta, p_join_type, END_POLYGON); } - static Vector > offset_polyline_2d(const Vector &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) { + static Vector> offset_polyline_2d(const Vector &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) { - ERR_FAIL_COND_V_MSG(p_end_type == END_POLYGON, Vector >(), "Attempt to offset a polyline like a polygon (use offset_polygon_2d instead)."); + ERR_FAIL_COND_V_MSG(p_end_type == END_POLYGON, Vector>(), "Attempt to offset a polyline like a polygon (use offset_polygon_2d instead)."); return _polypath_offset(p_polygon, p_delta, p_join_type, p_end_type); } @@ -899,7 +899,7 @@ public: return (intersections & 1); } - static Vector > separate_objects(Vector p_array); + static Vector> separate_objects(Vector p_array); // Create a "wrap" that encloses the given geometry. static Vector wrap_geometry(Vector p_array, real_t *p_error = NULL); @@ -1004,7 +1004,7 @@ public: H.resize(k); return H; } - static Vector > decompose_polygon_in_convex(Vector polygon); + static Vector> decompose_polygon_in_convex(Vector polygon); static MeshData build_convex_mesh(const Vector &p_planes); static Vector build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z); @@ -1015,8 +1015,8 @@ public: static void make_atlas(const Vector &p_rects, Vector &r_result, Size2i &r_size); private: - static Vector > _polypaths_do_operation(PolyBooleanOperation p_op, const Vector &p_polypath_a, const Vector &p_polypath_b, bool is_a_open = false); - static Vector > _polypath_offset(const Vector &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type); + static Vector> _polypaths_do_operation(PolyBooleanOperation p_op, const Vector &p_polypath_a, const Vector &p_polypath_b, bool is_a_open = false); + static Vector> _polypath_offset(const Vector &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type); }; #endif diff --git a/core/method_ptrcall.h b/core/method_ptrcall.h index 3db186ca69..d09242e2f1 100644 --- a/core/method_ptrcall.h +++ b/core/method_ptrcall.h @@ -192,7 +192,7 @@ struct PtrToArg { #define MAKE_VECARG(m_type) \ template <> \ - struct PtrToArg > { \ + struct PtrToArg> { \ _FORCE_INLINE_ static Vector convert(const void *p_ptr) { \ const Vector *dvs = reinterpret_cast *>(p_ptr); \ Vector ret; \ @@ -237,7 +237,7 @@ struct PtrToArg { #define MAKE_VECARG_ALT(m_type, m_type_alt) \ template <> \ - struct PtrToArg > { \ + struct PtrToArg> { \ _FORCE_INLINE_ static Vector convert(const void *p_ptr) { \ const Vector *dvs = reinterpret_cast *>(p_ptr); \ Vector ret; \ @@ -293,7 +293,7 @@ MAKE_VECARG_ALT(String, StringName); //for stuff that gets converted to Array vectors #define MAKE_VECARR(m_type) \ template <> \ - struct PtrToArg > { \ + struct PtrToArg> { \ _FORCE_INLINE_ static Vector convert(const void *p_ptr) { \ const Array *arr = reinterpret_cast(p_ptr); \ Vector ret; \ @@ -333,7 +333,7 @@ MAKE_VECARR(Plane); #define MAKE_DVECARR(m_type) \ template <> \ - struct PtrToArg > { \ + struct PtrToArg> { \ _FORCE_INLINE_ static Vector convert(const void *p_ptr) { \ const Array *arr = reinterpret_cast(p_ptr); \ Vector ret; \ @@ -402,7 +402,7 @@ MAKE_VECARR(Plane); MAKE_STRINGCONV_BY_REFERENCE(IP_Address); template <> -struct PtrToArg > { +struct PtrToArg> { _FORCE_INLINE_ static Vector convert(const void *p_ptr) { const Vector *dvs = reinterpret_cast *>(p_ptr); Vector ret; diff --git a/core/oa_hash_map.h b/core/oa_hash_map.h index 182ed8b116..7ceba26be8 100644 --- a/core/oa_hash_map.h +++ b/core/oa_hash_map.h @@ -48,7 +48,7 @@ */ template > + class Comparator = HashMapComparatorDefault> class OAHashMap { private: diff --git a/core/ordered_hash_map.h b/core/ordered_hash_map.h index a10cf06b75..055e3e607e 100644 --- a/core/ordered_hash_map.h +++ b/core/ordered_hash_map.h @@ -45,7 +45,7 @@ */ template , uint8_t MIN_HASH_TABLE_POWER = 3, uint8_t RELATIONSHIP = 8> class OrderedHashMap { - typedef List > InternalList; + typedef List> InternalList; typedef HashMap InternalMap; InternalList list; diff --git a/core/os/mutex.cpp b/core/os/mutex.cpp index 97297dca28..31a0dc2bfa 100644 --- a/core/os/mutex.cpp +++ b/core/os/mutex.cpp @@ -44,7 +44,7 @@ void _global_unlock() { template class MutexImpl; template class MutexImpl; -template class MutexLock >; -template class MutexLock >; +template class MutexLock>; +template class MutexLock>; #endif diff --git a/core/os/mutex.h b/core/os/mutex.h index 9033f0cb06..b44b1994de 100644 --- a/core/os/mutex.h +++ b/core/os/mutex.h @@ -76,8 +76,8 @@ using BinaryMutex = MutexImpl; // Non-recursive, handle with care extern template class MutexImpl; extern template class MutexImpl; -extern template class MutexLock >; -extern template class MutexLock >; +extern template class MutexLock>; +extern template class MutexLock>; #else diff --git a/core/os/threaded_array_processor.h b/core/os/threaded_array_processor.h index 9dcd6ceece..00dc53286e 100644 --- a/core/os/threaded_array_processor.h +++ b/core/os/threaded_array_processor.h @@ -80,7 +80,7 @@ void thread_process_array(uint32_t p_elements, C *p_instance, M p_method, U p_us threads.resize(OS::get_singleton()->get_processor_count()); for (int i = 0; i < threads.size(); i++) { - threads.write[i] = Thread::create(process_array_thread >, &data); + threads.write[i] = Thread::create(process_array_thread>, &data); } for (int i = 0; i < threads.size(); i++) { diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 3a21610331..36fb016448 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -652,7 +652,7 @@ Error ProjectSettings::save() { return save_custom(get_resource_path().plus_file("project.godot")); } -Error ProjectSettings::_save_settings_binary(const String &p_file, const Map > &props, const CustomMap &p_custom, const String &p_custom_features) { +Error ProjectSettings::_save_settings_binary(const String &p_file, const Map> &props, const CustomMap &p_custom, const String &p_custom_features) { Error err; FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err); @@ -663,7 +663,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map >::Element *E = props.front(); E; E = E->next()) { + for (Map>::Element *E = props.front(); E; E = E->next()) { for (List::Element *F = E->get().front(); F; F = F->next()) { @@ -700,7 +700,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Mapstore_32(count); //store how many properties are saved } - for (Map >::Element *E = props.front(); E; E = E->next()) { + for (Map>::Element *E = props.front(); E; E = E->next()) { for (List::Element *F = E->get().front(); F; F = F->next()) { @@ -740,7 +740,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map > &props, const CustomMap &p_custom, const String &p_custom_features) { +Error ProjectSettings::_save_settings_text(const String &p_file, const Map> &props, const CustomMap &p_custom, const String &p_custom_features) { Error err; FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err); @@ -761,7 +761,7 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Mapstore_string("custom_features=\"" + p_custom_features + "\"\n"); file->store_string("\n"); - for (Map >::Element *E = props.front(); E; E = E->next()) { + for (Map>::Element *E = props.front(); E; E = E->next()) { if (E != props.front()) file->store_string("\n"); @@ -838,7 +838,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust vclist.insert(vc); } - Map > props; + Map> props; for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) { diff --git a/core/project_settings.h b/core/project_settings.h index ed153bdc20..8695df560e 100644 --- a/core/project_settings.h +++ b/core/project_settings.h @@ -97,8 +97,8 @@ protected: Error _load_settings_binary(const String &p_path); Error _load_settings_text_or_binary(const String &p_text_path, const String &p_bin_path); - Error _save_settings_text(const String &p_file, const Map > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); - Error _save_settings_binary(const String &p_file, const Map > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); + Error _save_settings_text(const String &p_file, const Map> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); + Error _save_settings_binary(const String &p_file, const Map> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String()); Error _save_custom_bnd(const String &p_file); diff --git a/core/reference.h b/core/reference.h index fd42c4e537..6898bfec3b 100644 --- a/core/reference.h +++ b/core/reference.h @@ -285,7 +285,7 @@ public: #ifdef PTRCALL_ENABLED template -struct PtrToArg > { +struct PtrToArg> { _FORCE_INLINE_ static Ref convert(const void *p_ptr) { @@ -312,7 +312,7 @@ struct PtrToArg &> { #ifdef DEBUG_METHODS_ENABLED template -struct GetTypeInfo > { +struct GetTypeInfo> { static const Variant::Type VARIANT_TYPE = Variant::OBJECT; static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; diff --git a/core/resource.cpp b/core/resource.cpp index 2afc9e4042..e329a1574f 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -149,7 +149,7 @@ void Resource::reload_from_file() { } } -Ref Resource::duplicate_for_local_scene(Node *p_for_scene, Map, Ref > &remap_cache) { +Ref Resource::duplicate_for_local_scene(Node *p_for_scene, Map, Ref> &remap_cache) { List plist; get_property_list(&plist); @@ -190,7 +190,7 @@ Ref Resource::duplicate_for_local_scene(Node *p_for_scene, Map, Ref > &remap_cache) { +void Resource::configure_for_local_scene(Node *p_for_scene, Map, Ref> &remap_cache) { List plist; get_property_list(&plist); @@ -455,7 +455,7 @@ Resource::~Resource() { HashMap ResourceCache::resources; #ifdef TOOLS_ENABLED -HashMap > ResourceCache::resource_path_cache; +HashMap> ResourceCache::resource_path_cache; #endif RWLock *ResourceCache::lock = NULL; @@ -512,7 +512,7 @@ Resource *ResourceCache::get(const String &p_path) { return *res; } -void ResourceCache::get_cached_resources(List > *p_resources) { +void ResourceCache::get_cached_resources(List> *p_resources) { lock->read_lock(); const String *K = NULL; diff --git a/core/resource.h b/core/resource.h index b30788010b..4b79a39d9d 100644 --- a/core/resource.h +++ b/core/resource.h @@ -103,8 +103,8 @@ public: int get_subindex() const; virtual Ref duplicate(bool p_subresources = false) const; - Ref duplicate_for_local_scene(Node *p_for_scene, Map, Ref > &remap_cache); - void configure_for_local_scene(Node *p_for_scene, Map, Ref > &remap_cache); + Ref duplicate_for_local_scene(Node *p_for_scene, Map, Ref> &remap_cache); + void configure_for_local_scene(Node *p_for_scene, Map, Ref> &remap_cache); void set_local_to_scene(bool p_enable); bool is_local_to_scene() const; @@ -150,7 +150,7 @@ class ResourceCache { static RWLock *lock; static HashMap resources; #ifdef TOOLS_ENABLED - static HashMap > resource_path_cache; // each tscn has a set of resource paths and IDs + static HashMap> resource_path_cache; // each tscn has a set of resource paths and IDs static RWLock *path_cache_lock; #endif // TOOLS_ENABLED friend void unregister_core_types(); @@ -163,7 +163,7 @@ public: static bool has(const String &p_path); static Resource *get(const String &p_path); static void dump(const char *p_file = NULL, bool p_short = false); - static void get_cached_resources(List > *p_resources); + static void get_cached_resources(List> *p_resources); static int get_cached_resource_count(); }; diff --git a/core/script_language.cpp b/core/script_language.cpp index 428f363b17..c664563909 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -284,7 +284,7 @@ void ScriptServer::save_global_classes() { } //////////////////// -void ScriptInstance::get_property_state(List > &state) { +void ScriptInstance::get_property_state(List> &state) { List pinfo; get_property_list(&pinfo); diff --git a/core/script_language.h b/core/script_language.h index f1b809425b..bb7d74dd83 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -192,7 +192,7 @@ public: virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = NULL) const = 0; virtual Object *get_owner() { return NULL; } - virtual void get_property_state(List > &state); + virtual void get_property_state(List> &state); virtual void get_method_list(List *p_list) const = 0; virtual bool has_method(const StringName &p_method) const = 0; @@ -375,7 +375,7 @@ public: virtual void get_recognized_extensions(List *p_extensions) const = 0; virtual void get_public_functions(List *p_functions) const = 0; - virtual void get_public_constants(List > *p_constants) const = 0; + virtual void get_public_constants(List> *p_constants) const = 0; struct ProfilingInfo { StringName signature; diff --git a/core/translation.cpp b/core/translation.cpp index 17c23b86cd..7399fa5619 100644 --- a/core/translation.cpp +++ b/core/translation.cpp @@ -995,7 +995,7 @@ String TranslationServer::get_locale_name(const String &p_locale) const { Array TranslationServer::get_loaded_locales() const { Array locales; - for (const Set >::Element *E = translations.front(); E; E = E->next()) { + for (const Set>::Element *E = translations.front(); E; E = E->next()) { const Ref &t = E->get(); ERR_FAIL_COND_V(t.is_null(), Array()); @@ -1072,7 +1072,7 @@ StringName TranslationServer::translate(const StringName &p_message) const { String lang = get_language_code(locale); bool near_match = false; - for (const Set >::Element *E = translations.front(); E; E = E->next()) { + for (const Set>::Element *E = translations.front(); E; E = E->next()) { const Ref &t = E->get(); ERR_FAIL_COND_V(t.is_null(), p_message); String l = t->get_locale(); @@ -1105,7 +1105,7 @@ StringName TranslationServer::translate(const StringName &p_message) const { String fallback_lang = get_language_code(fallback); near_match = false; - for (const Set >::Element *E = translations.front(); E; E = E->next()) { + for (const Set>::Element *E = translations.front(); E; E = E->next()) { const Ref &t = E->get(); ERR_FAIL_COND_V(t.is_null(), p_message); String l = t->get_locale(); diff --git a/core/translation.h b/core/translation.h index 0448ea56c5..b9e07fa2b1 100644 --- a/core/translation.h +++ b/core/translation.h @@ -71,7 +71,7 @@ class TranslationServer : public Object { String locale; String fallback; - Set > translations; + Set> translations; Ref tool_translation; Map locale_name_map; diff --git a/core/type_info.h b/core/type_info.h index 5dacf67de4..618419a323 100644 --- a/core/type_info.h +++ b/core/type_info.h @@ -201,7 +201,7 @@ struct GetTypeInfo { #define MAKE_TEMPLATE_TYPE_INFO(m_template, m_type, m_var_type) \ template <> \ - struct GetTypeInfo > { \ + struct GetTypeInfo> { \ static const Variant::Type VARIANT_TYPE = m_var_type; \ static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; \ static inline PropertyInfo get_class_info() { \ diff --git a/core/variant.cpp b/core/variant.cpp index b82602a5a4..d12a15ec9d 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -2325,31 +2325,31 @@ inline DA _convert_array_from_variant(const Variant &p_variant) { return _convert_array(p_variant.operator Array()); } case Variant::PACKED_BYTE_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } case Variant::PACKED_INT32_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } case Variant::PACKED_INT64_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } case Variant::PACKED_FLOAT32_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } case Variant::PACKED_FLOAT64_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } case Variant::PACKED_STRING_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } case Variant::PACKED_VECTOR2_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } case Variant::PACKED_VECTOR3_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } case Variant::PACKED_COLOR_ARRAY: { - return _convert_array >(p_variant.operator Vector()); + return _convert_array>(p_variant.operator Vector()); } default: { return DA(); @@ -2370,21 +2370,21 @@ Variant::operator Vector() const { if (type == PACKED_BYTE_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator Vector() const { if (type == PACKED_INT32_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator Vector() const { if (type == PACKED_INT64_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator Vector() const { @@ -2392,7 +2392,7 @@ Variant::operator Vector() const { if (type == PACKED_FLOAT32_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator Vector() const { @@ -2400,7 +2400,7 @@ Variant::operator Vector() const { if (type == PACKED_FLOAT64_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator Vector() const { @@ -2408,21 +2408,21 @@ Variant::operator Vector() const { if (type == PACKED_STRING_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator Vector() const { if (type == PACKED_VECTOR3_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator Vector() const { if (type == PACKED_VECTOR2_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator Vector() const { @@ -2430,7 +2430,7 @@ Variant::operator Vector() const { if (type == PACKED_COLOR_ARRAY) return static_cast *>(_data.packed_array)->array; else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } /* helpers */ diff --git a/core/vector.h b/core/vector.h index d3476679ff..51a73e4ae4 100644 --- a/core/vector.h +++ b/core/vector.h @@ -103,7 +103,7 @@ public: void sort() { - sort_custom<_DefaultComparator >(); + sort_custom<_DefaultComparator>(); } void ordered_insert(const T &p_val) { -- cgit v1.2.3