diff --git a/.clang-format b/.clang-format index cb67d39917f..286c22cbe9b 100644 --- a/.clang-format +++ b/.clang-format @@ -112,11 +112,10 @@ UseTab: Always --- ### C++ specific config ### Language: Cpp -Standard: Cpp03 +Standard: c++14 --- ### ObjC specific config ### Language: ObjC -Standard: Cpp03 ObjCBlockIndentWidth: 4 # ObjCSpaceAfterProperty: false # ObjCSpaceBeforeProtocolList: true diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 514a22fa6bc..64ac1c55888 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1025,10 +1025,10 @@ void _OS::print_all_textures_by_size() { List<_OSCoreBindImg> imgs; uint64_t 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; @@ -1059,10 +1059,10 @@ void _OS::print_resources_by_type(const Vector &p_types) { Map type_count; - List > resources; + List> resources; ResourceCache::get_cached_resources(&resources); - for (List >::Element *E = resources.front(); E; E = E->next()) { + for (List>::Element *E = resources.front(); E; E = E->next()) { Ref r = E->get(); @@ -1747,7 +1747,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; @@ -1759,7 +1759,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; @@ -1771,7 +1771,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; @@ -1783,7 +1783,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; @@ -1795,7 +1795,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; @@ -1807,7 +1807,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; @@ -1819,7 +1819,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; @@ -1831,7 +1831,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 1a9f46223fd..6b466591ba2 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -1391,7 +1391,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 136af723765..bc9308bcb23 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -117,7 +117,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 @@ -158,7 +158,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; private: diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp index 9085802d56c..0887316a6ec 100644 --- a/core/compressed_translation.cpp +++ b/core/compressed_translation.cpp @@ -51,8 +51,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; @@ -110,7 +110,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/input_map.cpp b/core/input_map.cpp index fb5644ceb7a..076aba8e4ff 100644 --- a/core/input_map.cpp +++ b/core/input_map.cpp @@ -130,10 +130,10 @@ 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 { ERR_FAIL_COND_V(!p_event.is_valid(), NULL); - 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(); @@ -185,7 +185,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); if (Input::get_singleton()->is_action_pressed(p_action)) { @@ -204,9 +204,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()); } @@ -215,7 +215,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) @@ -243,7 +243,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 14063726103..963a48e23c8 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(); @@ -78,7 +78,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 da6c0c8bfcb..04e3fb053a7 100644 --- a/core/io/config_file.cpp +++ b/core/io/config_file.cpp @@ -106,7 +106,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()); } } @@ -186,7 +186,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 7fb615a9a73..e3e26ffe124 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; PoolStringArray _get_sections() const; PoolStringArray _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 d0bb13c3e58..cb44bf65dd2 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -34,12 +34,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; @@ -88,7 +88,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 d810b40c50d..cc99dac585c 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -389,7 +389,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 54300eac5d1..0b2ac9cb22a 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; @@ -375,7 +375,7 @@ void ResourceFormatImporter::get_importers_for_extension(const String &p_extensi } } -void ResourceFormatImporter::get_importers(List > *r_importers) { +void ResourceFormatImporter::get_importers(List> *r_importers) { for (int i = 0; i < importers.size(); i++) { r_importers->push_back(importers[i]); } @@ -429,7 +429,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 2fd586259ad..a8d7f6279ee 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,8 +83,8 @@ 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(List > *r_importers); + void get_importers_for_extension(const String &p_extension, List> *r_importers); + void get_importers(List> *r_importers); bool are_import_settings_valid(const String &p_path) const; String get_import_settings_hash() const; @@ -126,7 +126,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 19cd36d2a95..60213b71cec 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -970,7 +970,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]); @@ -1005,7 +1005,7 @@ bool ResourceLoader::abort_on_missing_resource = true; bool ResourceLoader::timestamp_on_load = false; 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 9b4e824df88..5b9f9e8110a 100644 --- a/core/io/resource_loader.h +++ b/core/io/resource_loader.h @@ -104,7 +104,7 @@ class ResourceLoader { 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 8256403c17e..92d07dc1bb6 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 877e5e3c4ee..b9a13dc7a83 100644 --- a/core/list.h +++ b/core/list.h @@ -600,7 +600,7 @@ public: void sort() { - sort_custom >(); + sort_custom>(); } template @@ -681,7 +681,7 @@ public: idx++; } - SortArray > sort; + SortArray> sort; sort.sort(aux_buffer, s); _data->first = aux_buffer[0]; diff --git a/core/local_vector.h b/core/local_vector.h index 37a4fd3d1ab..1ac164e142c 100644 --- a/core/local_vector.h +++ b/core/local_vector.h @@ -197,7 +197,7 @@ public: } void sort() { - sort_custom<_DefaultComparator >(); + sort_custom<_DefaultComparator>(); } void ordered_insert(T p_val) { diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index f976ac3a372..b68325c8a00 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -217,9 +217,9 @@ static bool _group_face(_FaceClassify *p_faces, int len, int p_index, int p_grou return true; } -PoolVector > Geometry::separate_objects(PoolVector p_array) { +PoolVector> Geometry::separate_objects(PoolVector p_array) { - PoolVector > objects; + PoolVector> objects; int len = p_array.size(); @@ -242,7 +242,7 @@ PoolVector > Geometry::separate_objects(PoolVector p_ar bool error = _connect_faces(_fcptr, len, -1); - ERR_FAIL_COND_V_MSG(error, PoolVector >(), "Invalid geometry."); + ERR_FAIL_COND_V_MSG(error, PoolVector>(), "Invalid geometry."); // Group connected faces in separate objects. @@ -266,7 +266,7 @@ PoolVector > Geometry::separate_objects(PoolVector p_ar if (group >= 0) { objects.resize(group); - PoolVector >::Write obw = objects.write(); + PoolVector>::Write obw = objects.write(); PoolVector *group_faces = obw.ptr(); for (int i = 0; i < len; i++) { @@ -689,8 +689,8 @@ PoolVector Geometry::wrap_geometry(PoolVector p_array, real_t *p_e 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; @@ -1093,7 +1093,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; @@ -1128,7 +1128,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; @@ -1145,7 +1145,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; @@ -1179,7 +1179,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 a3d44fbfbc7..056977c5d0e 100644 --- a/core/math/geometry.h +++ b/core/math/geometry.h @@ -820,44 +820,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); } @@ -929,7 +929,7 @@ public: return (intersections & 1); } - static PoolVector > separate_objects(PoolVector p_array); + static PoolVector> separate_objects(PoolVector p_array); // Create a "wrap" that encloses the given geometry. static PoolVector wrap_geometry(PoolVector p_array, real_t *p_error = NULL); @@ -1034,7 +1034,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 PoolVector &p_planes); static PoolVector build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z); @@ -1054,8 +1054,8 @@ public: static Vector compute_convex_mesh_points(const Plane *p_planes, int p_plane_count); 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 a62e691d1e8..b44542e087b 100644 --- a/core/method_ptrcall.h +++ b/core/method_ptrcall.h @@ -171,7 +171,7 @@ struct PtrToArg { #define MAKE_VECARG(m_type) \ template <> \ - struct PtrToArg > { \ + struct PtrToArg> { \ _FORCE_INLINE_ static Vector convert(const void *p_ptr) { \ const PoolVector *dvs = reinterpret_cast *>(p_ptr); \ Vector ret; \ @@ -216,7 +216,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 PoolVector *dvs = reinterpret_cast *>(p_ptr); \ Vector ret; \ @@ -270,7 +270,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; \ @@ -310,7 +310,7 @@ MAKE_VECARR(Plane); #define MAKE_DVECARR(m_type) \ template <> \ - struct PtrToArg > { \ + struct PtrToArg> { \ _FORCE_INLINE_ static PoolVector convert(const void *p_ptr) { \ const Array *arr = reinterpret_cast(p_ptr); \ PoolVector ret; \ @@ -402,7 +402,7 @@ MAKE_STRINGCONV(StringName); MAKE_STRINGCONV_BY_REFERENCE(IP_Address); template <> -struct PtrToArg > { +struct PtrToArg> { _FORCE_INLINE_ static PoolVector convert(const void *p_ptr) { const PoolVector *dvs = reinterpret_cast *>(p_ptr); PoolVector ret; diff --git a/core/oa_hash_map.h b/core/oa_hash_map.h index 127a1cc26ae..da09214c6f4 100644 --- a/core/oa_hash_map.h +++ b/core/oa_hash_map.h @@ -50,7 +50,7 @@ */ template > + class Comparator = HashMapComparatorDefault> class OAHashMap { private: diff --git a/core/ordered_hash_map.h b/core/ordered_hash_map.h index b7bb717e481..7213da7963b 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/threaded_array_processor.h b/core/os/threaded_array_processor.h index d07494ce0d3..354d5fe0465 100644 --- a/core/os/threaded_array_processor.h +++ b/core/os/threaded_array_processor.h @@ -79,7 +79,7 @@ void thread_process_array(uint32_t p_elements, C *p_instance, M p_method, U p_us Thread *threads = memnew_arr(Thread, thread_count); for (int i = 0; i < thread_count; i++) { - threads[i].start(process_array_thread >, &data); + threads[i].start(process_array_thread>, &data); } for (int i = 0; i < thread_count; i++) { diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 46ab8f5f679..991adbc6389 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -667,7 +667,7 @@ Error ProjectSettings::save() { return error; } -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); @@ -678,7 +678,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()) { @@ -715,7 +715,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()) { @@ -755,7 +755,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); @@ -776,7 +776,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"); @@ -853,7 +853,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 3e8d7849e6b..e4d66556346 100644 --- a/core/project_settings.h +++ b/core/project_settings.h @@ -98,8 +98,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 b7bc4ca30cb..652767416bb 100644 --- a/core/reference.h +++ b/core/reference.h @@ -318,7 +318,7 @@ public: #ifdef PTRCALL_ENABLED template -struct PtrToArg > { +struct PtrToArg> { _FORCE_INLINE_ static Ref convert(const void *p_ptr) { @@ -371,7 +371,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 f0c30928dc5..22a44361049 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -150,7 +150,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); @@ -189,7 +189,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); @@ -437,7 +437,7 @@ Resource::~Resource() { HashMap ResourceCache::resources; #ifdef TOOLS_ENABLED -HashMap > ResourceCache::resource_path_cache; +HashMap> ResourceCache::resource_path_cache; #endif RWLock ResourceCache::lock; @@ -486,7 +486,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 d94e1b54314..f519219a137 100644 --- a/core/resource.h +++ b/core/resource.h @@ -104,8 +104,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; @@ -151,7 +151,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/safe_refcount.h b/core/safe_refcount.h index c34d84f55b3..4fae30e2319 100644 --- a/core/safe_refcount.h +++ b/core/safe_refcount.h @@ -52,7 +52,7 @@ #define SAFE_NUMERIC_TYPE_PUN_GUARANTEES(m_type) \ static_assert(sizeof(SafeNumeric) == sizeof(m_type), ""); \ static_assert(alignof(SafeNumeric) == alignof(m_type), ""); \ - static_assert(std::is_trivially_destructible >::value, ""); + static_assert(std::is_trivially_destructible>::value, ""); #if defined(DEBUG_ENABLED) void check_lockless_atomics(); diff --git a/core/script_debugger_local.cpp b/core/script_debugger_local.cpp index 3cc14daf4c2..0867d003b46 100644 --- a/core/script_debugger_local.cpp +++ b/core/script_debugger_local.cpp @@ -178,14 +178,14 @@ void ScriptDebuggerLocal::debug(ScriptLanguage *p_script, bool p_can_continue, b if (line.get_slice_count(" ") <= 1) { - const Map > &breakpoints = get_breakpoints(); + const Map> &breakpoints = 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/script_language.cpp b/core/script_language.cpp index f2822926e93..5af37792356 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -295,7 +295,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 ea7ae846167..642c26cc41c 100644 --- a/core/script_language.h +++ b/core/script_language.h @@ -165,7 +165,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; @@ -341,7 +341,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; @@ -423,7 +423,7 @@ class ScriptDebugger { int depth; static ScriptDebugger *singleton; - Map > breakpoints; + Map> breakpoints; ScriptLanguage *break_lang; @@ -441,7 +441,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; } virtual void debug(ScriptLanguage *p_script, bool p_can_continue = true, bool p_is_error_breakpoint = false) = 0; virtual void idle_poll(); diff --git a/core/translation.cpp b/core/translation.cpp index 5a7a5bcc8a6..2c491aafca8 100644 --- a/core/translation.cpp +++ b/core/translation.cpp @@ -1008,7 +1008,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()); @@ -1085,7 +1085,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(); @@ -1118,7 +1118,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 bb8af54b5dc..54a77869fbf 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 5227a8900ba..d5a56b4f80b 100644 --- a/core/type_info.h +++ b/core/type_info.h @@ -208,7 +208,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 9a068c0fcc1..f3b79ccc402 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1855,25 +1855,25 @@ inline DA _convert_array_from_variant(const Variant &p_variant) { return _convert_array(p_variant.operator Array()); } case Variant::POOL_BYTE_ARRAY: { - return _convert_array >(p_variant.operator PoolVector()); + return _convert_array>(p_variant.operator PoolVector()); } case Variant::POOL_INT_ARRAY: { - return _convert_array >(p_variant.operator PoolVector()); + return _convert_array>(p_variant.operator PoolVector()); } case Variant::POOL_REAL_ARRAY: { - return _convert_array >(p_variant.operator PoolVector()); + return _convert_array>(p_variant.operator PoolVector()); } case Variant::POOL_STRING_ARRAY: { - return _convert_array >(p_variant.operator PoolVector()); + return _convert_array>(p_variant.operator PoolVector()); } case Variant::POOL_VECTOR2_ARRAY: { - return _convert_array >(p_variant.operator PoolVector()); + return _convert_array>(p_variant.operator PoolVector()); } case Variant::POOL_VECTOR3_ARRAY: { - return _convert_array >(p_variant.operator PoolVector()); + return _convert_array>(p_variant.operator PoolVector()); } case Variant::POOL_COLOR_ARRAY: { - return _convert_array >(p_variant.operator PoolVector()); + return _convert_array>(p_variant.operator PoolVector()); } default: { return DA(); @@ -1894,21 +1894,21 @@ Variant::operator PoolVector() const { if (type == POOL_BYTE_ARRAY) return *reinterpret_cast *>(_data._mem); else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator PoolVector() const { if (type == POOL_INT_ARRAY) return *reinterpret_cast *>(_data._mem); else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator PoolVector() const { if (type == POOL_REAL_ARRAY) return *reinterpret_cast *>(_data._mem); else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator PoolVector() const { @@ -1916,21 +1916,21 @@ Variant::operator PoolVector() const { if (type == POOL_STRING_ARRAY) return *reinterpret_cast *>(_data._mem); else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator PoolVector() const { if (type == POOL_VECTOR3_ARRAY) return *reinterpret_cast *>(_data._mem); else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator PoolVector() const { if (type == POOL_VECTOR2_ARRAY) return *reinterpret_cast *>(_data._mem); else - return _convert_array_from_variant >(*this); + return _convert_array_from_variant>(*this); } Variant::operator PoolVector() const { @@ -1938,7 +1938,7 @@ Variant::operator PoolVector() const { if (type == POOL_COLOR_ARRAY) return *reinterpret_cast *>(_data._mem); 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 03ae1f46e22..269bc23bdd0 100644 --- a/core/vector.h +++ b/core/vector.h @@ -102,7 +102,7 @@ public: void sort() { - sort_custom<_DefaultComparator >(); + sort_custom<_DefaultComparator>(); } void ordered_insert(const T &p_val) { diff --git a/drivers/dummy/rasterizer_dummy.h b/drivers/dummy/rasterizer_dummy.h index 67d54956dcc..e20be97fc4f 100644 --- a/drivers/dummy/rasterizer_dummy.h +++ b/drivers/dummy/rasterizer_dummy.h @@ -138,7 +138,7 @@ public: PoolVector index_array; int index_count; AABB aabb; - Vector > blend_shapes; + Vector> blend_shapes; Vector bone_aabbs; }; @@ -298,7 +298,7 @@ public: return mesh_owner.make_rid(mesh); } - void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector > &p_blend_shapes = Vector >(), const Vector &p_bone_aabbs = Vector()) { + void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector> &p_blend_shapes = Vector>(), const Vector &p_bone_aabbs = Vector()) { DummyMesh *m = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!m); @@ -387,9 +387,9 @@ public: return m->surfaces[p_surface].aabb; } - Vector > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { + Vector> mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { DummyMesh *m = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!m, Vector >()); + ERR_FAIL_COND_V(!m, Vector>()); return m->surfaces[p_surface].blend_shapes; } diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index 8d6c8d4fa6a..d7d5483931c 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -2330,7 +2330,7 @@ static PoolVector _unpack_half_floats(const PoolVector &array, return ret; } -void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector > &p_blend_shapes, const Vector &p_bone_aabbs) { +void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector> &p_blend_shapes, const Vector &p_bone_aabbs) { Mesh *mesh = mesh_owner.getornull(p_mesh); ERR_FAIL_COND(!mesh); @@ -2795,10 +2795,10 @@ AABB RasterizerStorageGLES2::mesh_surface_get_aabb(RID p_mesh, int p_surface) co return mesh->surfaces[p_surface]->aabb; } -Vector > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { +Vector> RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { const Mesh *mesh = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!mesh, Vector >()); - ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector >()); + ERR_FAIL_COND_V(!mesh, Vector>()); + ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector>()); #ifndef TOOLS_ENABLED ERR_PRINT("OpenGL ES 2.0 does not allow retrieving blend shape data"); #endif diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h index 7a717dbe79c..9dc123c340c 100644 --- a/drivers/gles2/rasterizer_storage_gles2.h +++ b/drivers/gles2/rasterizer_storage_gles2.h @@ -280,7 +280,7 @@ public: RenderTarget *render_target; - Vector > images; + Vector> images; bool redraw_if_visible; @@ -566,7 +566,7 @@ public: Map params; SelfList list; SelfList dirty_list; - Vector > textures; + Vector> textures; float line_width; int render_priority; @@ -677,7 +677,7 @@ public: PoolVector data; PoolVector index_data; - Vector > blend_shape_data; + Vector> blend_shape_data; int total_data_size; @@ -729,7 +729,7 @@ public: virtual RID mesh_create(); - virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector > &p_blend_shapes = Vector >(), const Vector &p_bone_aabbs = Vector()); + virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector> &p_blend_shapes = Vector>(), const Vector &p_bone_aabbs = Vector()); virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount); virtual int mesh_get_blend_shape_count(RID p_mesh) const; @@ -752,7 +752,7 @@ public: virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const; virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const; - virtual Vector > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const; + virtual Vector> mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const; virtual Vector mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const; virtual void mesh_remove_surface(RID p_mesh, int p_surface); diff --git a/drivers/gles2/shader_compiler_gles2.h b/drivers/gles2/shader_compiler_gles2.h index c4877d23b0e..968eb64cbf8 100644 --- a/drivers/gles2/shader_compiler_gles2.h +++ b/drivers/gles2/shader_compiler_gles2.h @@ -41,7 +41,7 @@ class ShaderCompilerGLES2 { public: struct IdentifierActions { - Map > render_mode_values; + Map> render_mode_values; Map render_mode_flags; Map usage_flag_pointers; Map write_flag_pointers; diff --git a/drivers/gles2/shader_gles2.h b/drivers/gles2/shader_gles2.h index b36973fb995..f7fa0a86b72 100644 --- a/drivers/gles2/shader_gles2.h +++ b/drivers/gles2/shader_gles2.h @@ -179,7 +179,7 @@ private: int max_image_units; - Map > > uniform_values; + Map>> uniform_values; protected: _FORCE_INLINE_ int _get_uniform(int p_which) const; diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index a3101ec37a6..858255b7dbe 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -3510,7 +3510,7 @@ RID RasterizerStorageGLES3::mesh_create() { return mesh_owner.make_rid(mesh); } -void RasterizerStorageGLES3::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector > &p_blend_shapes, const Vector &p_bone_aabbs) { +void RasterizerStorageGLES3::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector> &p_blend_shapes, const Vector &p_bone_aabbs) { PoolVector array = p_array; @@ -4169,13 +4169,13 @@ AABB RasterizerStorageGLES3::mesh_surface_get_aabb(RID p_mesh, int p_surface) co return mesh->surfaces[p_surface]->aabb; } -Vector > RasterizerStorageGLES3::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { +Vector> RasterizerStorageGLES3::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const { const Mesh *mesh = mesh_owner.getornull(p_mesh); - ERR_FAIL_COND_V(!mesh, Vector >()); - ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector >()); + ERR_FAIL_COND_V(!mesh, Vector>()); + ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector>()); - Vector > bsarr; + Vector> bsarr; for (int i = 0; i < mesh->surfaces[p_surface]->blend_shapes.size(); i++) { @@ -4190,7 +4190,7 @@ Vector > RasterizerStorageGLES3::mesh_surface_get_blend_shap } #else void *data = glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, mesh->surfaces[p_surface]->array_byte_size, GL_MAP_READ_BIT); - ERR_FAIL_COND_V(!data, Vector >()); + ERR_FAIL_COND_V(!data, Vector>()); { PoolVector::Write w = ret.write(); memcpy(w.ptr(), data, mesh->surfaces[p_surface]->array_byte_size); diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h index a95791a2308..2ec96032bdb 100644 --- a/drivers/gles3/rasterizer_storage_gles3.h +++ b/drivers/gles3/rasterizer_storage_gles3.h @@ -290,7 +290,7 @@ public: RenderTarget *render_target; - Vector > images; + Vector> images; VisualServer::TextureDetectCallback detect_3d; void *detect_3d_ud; @@ -763,7 +763,7 @@ public: virtual RID mesh_create(); - virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector > &p_blend_shapes = Vector >(), const Vector &p_bone_aabbs = Vector()); + virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const PoolVector &p_array, int p_vertex_count, const PoolVector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector> &p_blend_shapes = Vector>(), const Vector &p_bone_aabbs = Vector()); virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount); virtual int mesh_get_blend_shape_count(RID p_mesh) const; @@ -786,7 +786,7 @@ public: virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const; virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const; - virtual Vector > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const; + virtual Vector> mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const; virtual Vector mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const; virtual void mesh_remove_surface(RID p_mesh, int p_surface); diff --git a/drivers/gles3/shader_compiler_gles3.h b/drivers/gles3/shader_compiler_gles3.h index ee65b301089..0b6640bd3d7 100644 --- a/drivers/gles3/shader_compiler_gles3.h +++ b/drivers/gles3/shader_compiler_gles3.h @@ -40,7 +40,7 @@ class ShaderCompilerGLES3 { public: struct IdentifierActions { - Map > render_mode_values; + Map> render_mode_values; Map render_mode_flags; Map usage_flag_pointers; Map write_flag_pointers; diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index c0eba637c3b..2b778ac5dbe 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -1079,7 +1079,7 @@ void AnimationBezierTrackEdit::duplicate_selection() { undo_redo->create_action(TTR("Anim Duplicate Keys")); - List > new_selection_values; + List> new_selection_values; for (Set::Element *E = selection.back(); E; E = E->prev()) { @@ -1106,7 +1106,7 @@ void AnimationBezierTrackEdit::duplicate_selection() { //reselect duplicated selection.clear(); - for (List >::Element *E = new_selection_values.front(); E; E = E->next()) { + for (List>::Element *E = new_selection_values.front(); E; E = E->next()) { int track = E->get().first; float time = E->get().second; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 6274c5662f0..384062d60b4 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -752,7 +752,7 @@ public: if (animation != p_anim) return; - for (Map >::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (Map>::Element *E = key_ofs_map.front(); E; E = E->next()) { int key = 0; for (List::Element *F = E->value().front(); F; F = F->next()) { @@ -780,7 +780,7 @@ public: bool update_obj = false; bool change_notify_deserved = false; - for (Map >::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (Map>::Element *E = key_ofs_map.front(); E; E = E->next()) { int track = E->key(); for (List::Element *F = E->value().front(); F; F = F->next()) { @@ -1063,7 +1063,7 @@ public: bool _get(const StringName &p_name, Variant &r_ret) const { - for (Map >::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (Map>::Element *E = key_ofs_map.front(); E; E = E->next()) { int track = E->key(); for (List::Element *F = E->value().front(); F; F = F->next()) { @@ -1211,7 +1211,7 @@ public: bool show_time = true; bool same_track_type = true; bool same_key_type = true; - for (Map >::Element *E = key_ofs_map.front(); E; E = E->next()) { + for (Map>::Element *E = key_ofs_map.front(); E; E = E->next()) { int track = E->key(); ERR_FAIL_INDEX(track, animation->get_track_count()); @@ -1365,7 +1365,7 @@ public: Ref animation; - Map > key_ofs_map; + Map> key_ofs_map; Map base_map; PropertyInfo hint; @@ -4907,7 +4907,7 @@ void AnimationTrackEditor::_update_key_edit() { multi_key_edit = memnew(AnimationMultiTrackKeyEdit); multi_key_edit->animation = animation; - Map > key_ofs_map; + Map> key_ofs_map; Map base_map; int first_track = -1; for (Map::Element *E = selection.front(); E; E = E->next()) { @@ -5199,7 +5199,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { undo_redo->create_action(TTR("Anim Duplicate Keys")); - List > new_selection_values; + List> new_selection_values; for (Map::Element *E = selection.back(); E; E = E->prev()) { @@ -5237,7 +5237,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) { //reselect duplicated Map new_selection; - for (List >::Element *E = new_selection_values.front(); E; E = E->next()) { + for (List>::Element *E = new_selection_values.front(); E; E = E->next()) { int track = E->get().first; float time = E->get().second; diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h index e1798affa97..aafd7c52d6c 100644 --- a/editor/animation_track_editor.h +++ b/editor/animation_track_editor.h @@ -430,7 +430,7 @@ class AnimationTrackEditor : public VBoxContainer { Rect2 box_select_rect; void _scroll_input(const Ref &p_event); - Vector > track_edit_plugins; + Vector> track_edit_plugins; void _cancel_bezier_edit(); void _bezier_edit(int p_for_track); diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp index 76d3d54a23c..90ea35e0248 100644 --- a/editor/collada/collada.cpp +++ b/editor/collada/collada.cpp @@ -1773,12 +1773,12 @@ void Collada::_parse_animation(XMLParser &parser) { return; } - Map > float_sources; - Map > string_sources; + Map> float_sources; + Map> string_sources; Map source_strides; - Map > samplers; - Map > source_param_names; - Map > source_param_types; + Map> samplers; + Map> source_param_names; + Map> source_param_types; String id = ""; if (parser.has_attribute("id")) diff --git a/editor/collada/collada.h b/editor/collada/collada.h index 3151c179831..9a3ae82f44c 100644 --- a/editor/collada/collada.h +++ b/editor/collada/collada.h @@ -570,8 +570,8 @@ public: Vector animation_clips; Vector animation_tracks; - Map > referenced_tracks; - Map > by_id_tracks; + Map> referenced_tracks; + Map> by_id_tracks; float animation_length; diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 545959adc98..1ca93136f67 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -994,7 +994,7 @@ void ConnectionsDock::update_tree() { String descr; bool found = false; - Map >::Element *G = descr_cache.find(base); + Map>::Element *G = descr_cache.find(base); if (G) { Map::Element *F = G->get().find(signal_name); if (F) { diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h index d50ef880f98..e29d258c9e1 100644 --- a/editor/connections_dialog.h +++ b/editor/connections_dialog.h @@ -142,7 +142,7 @@ class ConnectionsDock : public VBoxContainer { UndoRedo *undo_redo; LineEdit *search_box; - Map > descr_cache; + Map> descr_cache; void _filter_changed(const String &p_text); diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index da9e40998e1..6f14ee61174 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -63,7 +63,7 @@ void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) { search->popup_centered_ratio(0.65); // So it doesn't completely cover the dialog below it. } -void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map > &candidates) { +void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map> &candidates) { for (int i = 0; i < efsd->get_subdir_count(); i++) { _fix_and_find(efsd->get_subdir(i), candidates); @@ -124,7 +124,7 @@ void DependencyEditor::_fix_all() { if (!EditorFileSystem::get_singleton()->get_filesystem()) return; - Map > candidates; + Map> candidates; for (List::Element *E = missing.front(); E; E = E->next()) { @@ -140,7 +140,7 @@ void DependencyEditor::_fix_all() { Map remaps; - for (Map >::Element *E = candidates.front(); E; E = E->next()) { + for (Map>::Element *E = candidates.front(); E; E = E->next()) { for (Map::Element *F = E->get().front(); F; F = F->next()) { diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h index bcfeb875339..39c803081b5 100644 --- a/editor/dependency_editor.h +++ b/editor/dependency_editor.h @@ -52,7 +52,7 @@ class DependencyEditor : public AcceptDialog { String editing; List missing; - void _fix_and_find(EditorFileSystemDirectory *efsd, Map > &candidates); + void _fix_and_find(EditorFileSystemDirectory *efsd, Map> &candidates); void _searched(const String &p_path); void _load_pressed(Object *p_item, int p_cell, int p_button); diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 99c3f41a5cc..7279387e8fe 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -692,10 +692,10 @@ void DocData::generate(bool p_basic_types) { } // Get constants. - List > cinfo; + List> cinfo; lang->get_public_constants(&cinfo); - for (List >::Element *E = cinfo.front(); E; E = E->next()) { + for (List>::Element *E = cinfo.front(); E; E = E->next()) { ConstantDoc cd; cd.name = E->get().first; diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index 29190bf9398..65dcf85bf0b 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -133,7 +133,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { ret = unzGoToNextFile(pkg); } - Map > extension_guess; + Map> extension_guess; { extension_guess["png"] = get_icon("ImageTexture", "EditorIcons"); extension_guess["jpg"] = get_icon("ImageTexture", "EditorIcons"); diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index f2e7a247a77..9b506876e85 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -522,7 +522,7 @@ Variant EditorData::instance_custom_type(const String &p_type, const String &p_i void EditorData::remove_custom_type(const String &p_type) { - for (Map >::Element *E = custom_types.front(); E; E = E->next()) { + for (Map>::Element *E = custom_types.front(); E; E = E->next()) { for (int i = 0; i < E->get().size(); i++) { if (E->get()[i].name == p_type) { diff --git a/editor/editor_data.h b/editor/editor_data.h index 1c740ad7ce5..ec8884a285a 100644 --- a/editor/editor_data.h +++ b/editor/editor_data.h @@ -136,7 +136,7 @@ private: String name; Variant value; }; - Map > custom_types; + Map> custom_types; List clipboard; UndoRedo undo_redo; @@ -182,7 +182,7 @@ public: void add_custom_type(const String &p_type, const String &p_inherits, const Ref