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`. --- scene/2d/animated_sprite.h | 2 +- scene/2d/collision_polygon_2d.cpp | 8 +++---- scene/2d/collision_polygon_2d.h | 2 +- scene/2d/navigation_polygon.h | 2 +- scene/2d/physics_body_2d.h | 2 +- scene/3d/collision_polygon.cpp | 2 +- scene/3d/gi_probe.h | 2 +- scene/3d/immediate_geometry.h | 2 +- scene/3d/mesh_instance.h | 2 +- scene/3d/particles.h | 2 +- scene/3d/physics_body.h | 2 +- scene/3d/ray_cast.cpp | 4 ++-- scene/3d/soft_body.cpp | 2 +- scene/3d/voxelizer.cpp | 2 +- scene/3d/voxelizer.h | 2 +- scene/animation/animation_tree.h | 4 ++-- scene/debugger/scene_debugger.cpp | 32 ++++++++++++------------- scene/debugger/scene_debugger.h | 4 ++-- scene/gui/control.h | 8 +++---- scene/gui/rich_text_label.h | 2 +- scene/gui/text_edit.h | 2 +- scene/main/scene_tree.cpp | 10 ++++---- scene/main/scene_tree.h | 4 ++-- scene/main/viewport.cpp | 2 +- scene/main/viewport.h | 2 +- scene/resources/animation.cpp | 2 +- scene/resources/animation.h | 12 +++++----- scene/resources/bit_map.cpp | 6 ++--- scene/resources/bit_map.h | 2 +- scene/resources/curve.cpp | 4 ++-- scene/resources/default_theme/default_theme.cpp | 2 +- scene/resources/dynamic_font.cpp | 12 +++++----- scene/resources/dynamic_font.h | 14 +++++------ scene/resources/font.h | 2 +- scene/resources/mesh.cpp | 20 ++++++++-------- scene/resources/mesh.h | 6 ++--- scene/resources/packed_scene.cpp | 10 ++++---- scene/resources/shader.cpp | 2 +- scene/resources/shader.h | 2 +- scene/resources/texture.cpp | 10 ++++---- scene/resources/texture.h | 2 +- scene/resources/theme.h | 12 +++++----- scene/resources/tile_set.cpp | 14 +++++------ scene/resources/tile_set.h | 8 +++---- 44 files changed, 125 insertions(+), 125 deletions(-) (limited to 'scene') diff --git a/scene/2d/animated_sprite.h b/scene/2d/animated_sprite.h index 37d093e3d8..e5d015b07c 100644 --- a/scene/2d/animated_sprite.h +++ b/scene/2d/animated_sprite.h @@ -42,7 +42,7 @@ class SpriteFrames : public Resource { float speed; bool loop; - Vector > frames; + Vector> frames; Anim() { loop = true; diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp index 4edf92197e..e9dfb94cb2 100644 --- a/scene/2d/collision_polygon_2d.cpp +++ b/scene/2d/collision_polygon_2d.cpp @@ -50,7 +50,7 @@ void CollisionPolygon2D::_build_polygon() { //here comes the sun, lalalala //decompose concave into multiple convex polygons and add them - Vector > decomp = _decompose_in_convex(); + Vector> decomp = _decompose_in_convex(); for (int i = 0; i < decomp.size(); i++) { Ref convex = memnew(ConvexPolygonShape2D); convex->set_points(decomp[i]); @@ -76,8 +76,8 @@ void CollisionPolygon2D::_build_polygon() { } } -Vector > CollisionPolygon2D::_decompose_in_convex() { - Vector > decomp = Geometry::decompose_polygon_in_convex(polygon); +Vector> CollisionPolygon2D::_decompose_in_convex() { + Vector> decomp = Geometry::decompose_polygon_in_convex(polygon); return decomp; } @@ -148,7 +148,7 @@ void CollisionPolygon2D::_notification(int p_what) { #define DEBUG_DECOMPOSE #if defined(TOOLS_ENABLED) && defined(DEBUG_DECOMPOSE) - Vector > decomp = _decompose_in_convex(); + Vector> decomp = _decompose_in_convex(); Color c(0.4, 0.9, 0.1); for (int i = 0; i < decomp.size(); i++) { diff --git a/scene/2d/collision_polygon_2d.h b/scene/2d/collision_polygon_2d.h index d8dfec8fd2..92a2758813 100644 --- a/scene/2d/collision_polygon_2d.h +++ b/scene/2d/collision_polygon_2d.h @@ -56,7 +56,7 @@ protected: bool one_way_collision; float one_way_collision_margin; - Vector > _decompose_in_convex(); + Vector> _decompose_in_convex(); void _build_polygon(); diff --git a/scene/2d/navigation_polygon.h b/scene/2d/navigation_polygon.h index 579d6b0e0e..3d096ec91b 100644 --- a/scene/2d/navigation_polygon.h +++ b/scene/2d/navigation_polygon.h @@ -43,7 +43,7 @@ class NavigationPolygon : public Resource { Vector indices; }; Vector polygons; - Vector > outlines; + Vector> outlines; mutable Rect2 item_rect; mutable bool rect_cache_dirty; diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 20e9f3ffcf..eb7aefb495 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -300,7 +300,7 @@ private: bool sync_to_physics; Vector colliders; - Vector > slide_colliders; + Vector> slide_colliders; Ref motion_cache; _FORCE_INLINE_ bool _ignores_mode(Physics2DServer::BodyMode) const; diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp index 636b859477..24c3a9eb41 100644 --- a/scene/3d/collision_polygon.cpp +++ b/scene/3d/collision_polygon.cpp @@ -44,7 +44,7 @@ void CollisionPolygon::_build_polygon() { if (polygon.size() == 0) return; - Vector > decomp = Geometry::decompose_polygon_in_convex(polygon); + Vector> decomp = Geometry::decompose_polygon_in_convex(polygon); if (decomp.size() == 0) return; diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h index 354eaad7c0..f991843883 100644 --- a/scene/3d/gi_probe.h +++ b/scene/3d/gi_probe.h @@ -135,7 +135,7 @@ private: struct PlotMesh { Ref override_material; - Vector > instance_materials; + Vector> instance_materials; Ref mesh; Transform local_xform; }; diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h index 77a20e8d4d..f9222c75fa 100644 --- a/scene/3d/immediate_geometry.h +++ b/scene/3d/immediate_geometry.h @@ -41,7 +41,7 @@ class ImmediateGeometry : public GeometryInstance { RID im; //a list of textures drawn need to be kept, to avoid references // in VisualServer from becoming invalid if the texture is no longer used - List > cached_textures; + List> cached_textures; bool empty; AABB aabb; diff --git a/scene/3d/mesh_instance.h b/scene/3d/mesh_instance.h index d49d9ed98f..a6190e7660 100644 --- a/scene/3d/mesh_instance.h +++ b/scene/3d/mesh_instance.h @@ -58,7 +58,7 @@ protected: }; Map blend_shape_tracks; - Vector > materials; + Vector> materials; void _mesh_changed(); void _resolve_skeleton_path(); diff --git a/scene/3d/particles.h b/scene/3d/particles.h index 95c6de15ec..cf461f25e9 100644 --- a/scene/3d/particles.h +++ b/scene/3d/particles.h @@ -69,7 +69,7 @@ private: DrawOrder draw_order; - Vector > draw_passes; + Vector> draw_passes; protected: static void _bind_methods(); diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h index 5362baf8ee..90de1ffce6 100644 --- a/scene/3d/physics_body.h +++ b/scene/3d/physics_body.h @@ -293,7 +293,7 @@ private: bool on_ceiling; bool on_wall; Vector colliders; - Vector > slide_colliders; + Vector> slide_colliders; Ref motion_cache; _FORCE_INLINE_ bool _ignores_mode(PhysicsServer::BodyMode) const; diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp index be1426f13c..f6eb3d954a 100644 --- a/scene/3d/ray_cast.cpp +++ b/scene/3d/ray_cast.cpp @@ -186,7 +186,7 @@ void RayCast::_notification(int p_what) { _update_raycast_state(); if (prev_collision_state != collided && get_tree()->is_debugging_collisions_hint()) { if (debug_material.is_valid()) { - Ref line_material = static_cast >(debug_material); + Ref line_material = static_cast>(debug_material); line_material->set_albedo(collided ? Color(1.0, 0, 0) : Color(1.0, 0.8, 0.6)); } } @@ -335,7 +335,7 @@ void RayCast::_create_debug_shape() { if (!debug_material.is_valid()) { debug_material = Ref(memnew(StandardMaterial3D)); - Ref line_material = static_cast >(debug_material); + Ref line_material = static_cast>(debug_material); line_material->set_shading_mode(StandardMaterial3D::SHADING_MODE_UNSHADED); line_material->set_albedo(Color(1.0, 0.8, 0.6)); } diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp index 3859a278ef..65f868aed4 100644 --- a/scene/3d/soft_body.cpp +++ b/scene/3d/soft_body.cpp @@ -479,7 +479,7 @@ void SoftBody::become_mesh_owner() { if (!mesh_owner) { mesh_owner = true; - Vector > copy_materials; + Vector> copy_materials; copy_materials.append_array(materials); ERR_FAIL_COND(!mesh->get_surface_count()); diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp index 0257e6e83d..203c3cd812 100644 --- a/scene/3d/voxelizer.cpp +++ b/scene/3d/voxelizer.cpp @@ -569,7 +569,7 @@ Voxelizer::MaterialCache Voxelizer::_get_material_cache(Ref p_material return mc; } -void Voxelizer::plot_mesh(const Transform &p_xform, Ref &p_mesh, const Vector > &p_materials, const Ref &p_override_material) { +void Voxelizer::plot_mesh(const Transform &p_xform, Ref &p_mesh, const Vector> &p_materials, const Ref &p_override_material) { for (int i = 0; i < p_mesh->get_surface_count(); i++) { diff --git a/scene/3d/voxelizer.h b/scene/3d/voxelizer.h index 1d50f1cd18..af9237ae7b 100644 --- a/scene/3d/voxelizer.h +++ b/scene/3d/voxelizer.h @@ -125,7 +125,7 @@ private: public: void begin_bake(int p_subdiv, const AABB &p_bounds); - void plot_mesh(const Transform &p_xform, Ref &p_mesh, const Vector > &p_materials, const Ref &p_override_material); + void plot_mesh(const Transform &p_xform, Ref &p_mesh, const Vector> &p_materials, const Ref &p_override_material); void end_bake(); int get_gi_probe_octree_depth() const; diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h index 8769e2c61d..742942fcda 100644 --- a/scene/animation/animation_tree.h +++ b/scene/animation/animation_tree.h @@ -285,7 +285,7 @@ private: void _tree_changed(); void _update_properties(); List properties; - HashMap > property_parent_map; + HashMap> property_parent_map; HashMap property_map; struct Activity { @@ -293,7 +293,7 @@ private: float activity; }; - HashMap > input_activity_map; + HashMap> input_activity_map; HashMap *> input_activity_map_get; void _update_properties_for_node(const String &p_base_path, Ref node); diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp index 2a98b4cf22..7a184adc55 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -230,8 +230,8 @@ void SceneDebugger::remove_from_cache(const String &p_filename, Node *p_node) { if (!debugger) return; - Map > &edit_cache = debugger->live_scene_edit_cache; - Map >::Element *E = edit_cache.find(p_filename); + Map> &edit_cache = debugger->live_scene_edit_cache; + Map>::Element *E = edit_cache.find(p_filename); if (E) { E->get().erase(p_node); if (E->get().size() == 0) { @@ -239,8 +239,8 @@ void SceneDebugger::remove_from_cache(const String &p_filename, Node *p_node) { } } - Map > &remove_list = debugger->live_edit_remove_list; - Map >::Element *F = remove_list.find(p_node); + Map> &remove_list = debugger->live_edit_remove_list; + Map>::Element *F = remove_list.find(p_node); if (F) { for (Map::Element *G = F->get().front(); G; G = G->next()) { @@ -293,8 +293,8 @@ SceneDebuggerObject::SceneDebuggerObject(ObjectID p_id) { } void SceneDebuggerObject::_parse_script_properties(Script *p_script, ScriptInstance *p_instance) { - typedef Map > ScriptMemberMap; - typedef Map > ScriptConstantsMap; + typedef Map> ScriptMemberMap; + typedef Map> ScriptConstantsMap; ScriptMemberMap members; if (p_instance) { @@ -519,7 +519,7 @@ void LiveEditor::_node_set_func(int p_id, const StringName &p_prop, const Varian if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable @@ -557,7 +557,7 @@ void LiveEditor::_node_call_func(int p_id, const StringName &p_method, VARIANT_A if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable @@ -630,7 +630,7 @@ void LiveEditor::_create_node_func(const NodePath &p_parent, const String &p_typ if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable @@ -668,7 +668,7 @@ void LiveEditor::_instance_node_func(const NodePath &p_parent, const String &p_p if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable @@ -701,7 +701,7 @@ void LiveEditor::_remove_node_func(const NodePath &p_at) { if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable @@ -732,7 +732,7 @@ void LiveEditor::_remove_and_keep_node_func(const NodePath &p_at, ObjectID p_kee if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable @@ -766,7 +766,7 @@ void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_a if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable @@ -783,7 +783,7 @@ void LiveEditor::_restore_node_func(ObjectID p_id, const NodePath &p_at, int p_a continue; Node *n2 = n->get_node(p_at); - Map >::Element *EN = live_edit_remove_list.find(n); + Map>::Element *EN = live_edit_remove_list.find(n); if (!EN) continue; @@ -812,7 +812,7 @@ void LiveEditor::_duplicate_node_func(const NodePath &p_at, const String &p_new_ if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable @@ -845,7 +845,7 @@ void LiveEditor::_reparent_node_func(const NodePath &p_at, const NodePath &p_new if (scene_tree->root->has_node(live_edit_root)) base = scene_tree->root->get_node(live_edit_root); - Map >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map>::Element *E = live_scene_edit_cache.find(live_edit_scene); if (!E) return; //scene not editable diff --git a/scene/debugger/scene_debugger.h b/scene/debugger/scene_debugger.h index afe58a5d01..e295510960 100644 --- a/scene/debugger/scene_debugger.h +++ b/scene/debugger/scene_debugger.h @@ -113,8 +113,8 @@ private: NodePath live_edit_root; String live_edit_scene; - Map > live_scene_edit_cache; - Map > live_edit_remove_list; + Map> live_scene_edit_cache; + Map> live_edit_remove_list; void _send_tree(); diff --git a/scene/gui/control.h b/scene/gui/control.h index 67e8ed0d27..15a32b8f67 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -198,10 +198,10 @@ private: NodePath focus_next; NodePath focus_prev; - HashMap > icon_override; - HashMap > shader_override; - HashMap > style_override; - HashMap > font_override; + HashMap> icon_override; + HashMap> shader_override; + HashMap> style_override; + HashMap> font_override; HashMap color_override; HashMap constant_override; diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 409aec0ca6..dd439208af 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -330,7 +330,7 @@ private: ItemMeta *meta_hovering; Variant current_meta; - Vector > custom_effects; + Vector> custom_effects; void _invalidate_current_line(ItemFrame *p_frame); void _validate_line_caches(ItemFrame *p_frame); diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 3c9d1a5c85..7d096f7897 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -268,7 +268,7 @@ private: } cache; Map color_region_cache; - Map > syntax_highlighting_cache; + Map> syntax_highlighting_cache; struct TextOperation { diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 57bb3b6b5e..f472de220b 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -172,7 +172,7 @@ void SceneTree::_flush_ugc() { while (unique_group_calls.size()) { - Map >::Element *E = unique_group_calls.front(); + Map>::Element *E = unique_group_calls.front(); Variant v[VARIANT_ARG_MAX]; for (int i = 0; i < E->get().size(); i++) @@ -546,11 +546,11 @@ bool SceneTree::idle(float p_time) { //go through timers - List >::Element *L = timers.back(); //last element + List>::Element *L = timers.back(); //last element - for (List >::Element *E = timers.front(); E;) { + for (List>::Element *E = timers.front(); E;) { - List >::Element *N = E->next(); + List>::Element *N = E->next(); if (pause && !E->get()->is_pause_mode_process()) { if (E == L) { break; //break on last, so if new timers were added during list traversal, ignore them. @@ -625,7 +625,7 @@ void SceneTree::finish() { } // cleanup timers - for (List >::Element *E = timers.front(); E; E = E->next()) { + for (List>::Element *E = timers.front(); E; E = E->next()) { E->get()->release_connections(); } timers.clear(); diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 1bef0d3131..2f805d074f 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -157,7 +157,7 @@ private: List delete_queue; - Map > unique_group_calls; + Map> unique_group_calls; bool ugc_locked; void _flush_ugc(); @@ -181,7 +181,7 @@ private: void _change_scene(Node *p_to); //void _call_group(uint32_t p_call_flags,const StringName& p_group,const StringName& p_function,const Variant& p_arg1,const Variant& p_arg2); - List > timers; + List> timers; ///network/// diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index c11b11bc71..dfd55e2577 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -422,7 +422,7 @@ void Viewport::_notification(int p_what) { // if no mouse event exists, create a motion one. This is necessary because objects or camera may have moved. // while this extra event is sent, it is checked if both camera and last object and last ID did not move. If nothing changed, the event is discarded to avoid flooding with unnecessary motion events every frame bool has_mouse_event = false; - for (List >::Element *E = physics_picking_events.front(); E; E = E->next()) { + for (List>::Element *E = physics_picking_events.front(); E; E = E->next()) { Ref m = E->get(); if (m.is_valid()) { has_mouse_event = true; diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 30c872b6ed..e511ce1b17 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -235,7 +235,7 @@ private: bool snap_controls_to_pixels; bool physics_object_picking; - List > physics_picking_events; + List> physics_picking_events; ObjectID physics_object_capture; ObjectID physics_object_over; Transform physics_last_object_transform; diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index ba1f738115..aa4c9bf225 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -1705,7 +1705,7 @@ float Animation::_cubic_interpolate(const float &p_pre_a, const float &p_a, cons } template -T Animation::_interpolate(const Vector > &p_keys, float p_time, InterpolationType p_interp, bool p_loop_wrap, bool *p_ok) const { +T Animation::_interpolate(const Vector> &p_keys, float p_time, InterpolationType p_interp, bool p_loop_wrap, bool *p_ok) const { int len = _find(p_keys, length) + 1; // try to find last key (there may be more past the end) diff --git a/scene/resources/animation.h b/scene/resources/animation.h index ea4f92878d..36d5df52df 100644 --- a/scene/resources/animation.h +++ b/scene/resources/animation.h @@ -105,7 +105,7 @@ private: struct TransformTrack : public Track { - Vector > transforms; + Vector> transforms; TransformTrack() { type = TYPE_TRANSFORM; } }; @@ -116,7 +116,7 @@ private: UpdateMode update_mode; bool update_on_seek; - Vector > values; + Vector> values; ValueTrack() { type = TYPE_VALUE; @@ -148,7 +148,7 @@ private: struct BezierTrack : public Track { - Vector > values; + Vector> values; BezierTrack() { type = TYPE_BEZIER; @@ -169,7 +169,7 @@ private: struct AudioTrack : public Track { - Vector > values; + Vector> values; AudioTrack() { type = TYPE_AUDIO; @@ -180,7 +180,7 @@ private: struct AnimationTrack : public Track { - Vector > values; + Vector> values; AnimationTrack() { type = TYPE_ANIMATION; @@ -216,7 +216,7 @@ private: _FORCE_INLINE_ float _cubic_interpolate(const float &p_pre_a, const float &p_a, const float &p_b, const float &p_post_b, float p_c) const; template - _FORCE_INLINE_ T _interpolate(const Vector > &p_keys, float p_time, InterpolationType p_interp, bool p_loop_wrap, bool *p_ok) const; + _FORCE_INLINE_ T _interpolate(const Vector> &p_keys, float p_time, InterpolationType p_interp, bool p_loop_wrap, bool *p_ok) const; template _FORCE_INLINE_ void _track_get_key_indices_in_range(const Vector &p_array, float from_time, float to_time, List *p_indices) const; diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index 6730f86e0c..d45f36dfd1 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -493,7 +493,7 @@ static void fill_bits(const BitMap *p_src, Ref &p_map, const Point2i &p_ print_verbose("BitMap: Max stack size: " + itos(stack.size())); } -Vector > BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon) const { +Vector> BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon) const { Rect2i r = Rect2i(0, 0, width, height).clip(p_rect); print_verbose("BitMap: Rect: " + r); @@ -503,7 +503,7 @@ Vector > BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, fl fill.instance(); fill->create(get_size()); - Vector > polygons; + Vector> polygons; for (int i = r.position.y; i < r.position.y + r.size.height; i++) { for (int j = r.position.x; j < r.position.x + r.size.width; j++) { if (!fill->get_bit(Point2(j, i)) && get_bit(Point2(j, i))) { @@ -591,7 +591,7 @@ void BitMap::shrink_mask(int p_pixels, const Rect2 &p_rect) { Array BitMap::_opaque_to_polygons_bind(const Rect2 &p_rect, float p_epsilon) const { - Vector > result = clip_opaque_to_polygons(p_rect, p_epsilon); + Vector> result = clip_opaque_to_polygons(p_rect, p_epsilon); // Convert result to bindable types diff --git a/scene/resources/bit_map.h b/scene/resources/bit_map.h index ed332dffa4..05313a0cff 100644 --- a/scene/resources/bit_map.h +++ b/scene/resources/bit_map.h @@ -72,7 +72,7 @@ public: void blit(const Vector2 &p_pos, const Ref &p_bitmap); Ref convert_to_image() const; - Vector > clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon = 2.0) const; + Vector> clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon = 2.0) const; BitMap(); }; diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index a68eb77378..d19eae0d4f 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -941,7 +941,7 @@ PackedVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) cons if (points.size() == 0) { return tess; } - Vector > midpoints; + Vector> midpoints; midpoints.resize(points.size() - 1); @@ -1615,7 +1615,7 @@ PackedVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) cons if (points.size() == 0) { return tess; } - Vector > midpoints; + Vector> midpoints; midpoints.resize(points.size() - 1); diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 04bc95ade6..9f5b49c4c3 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -38,7 +38,7 @@ #include "font_hidpi.inc" #include "font_lodpi.inc" -typedef Map > TexCacheMap; +typedef Map> TexCacheMap; static TexCacheMap *tex_cache; static float scale = 1; diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index ebd5b02dbc..410c4990a2 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -115,7 +115,7 @@ DynamicFontData::~DynamicFontData() { } //////////////////// -HashMap > DynamicFontAtSize::_fontdata; +HashMap> DynamicFontAtSize::_fontdata; Error DynamicFontAtSize::_load() { @@ -243,7 +243,7 @@ float DynamicFontAtSize::get_descent() const { return descent; } -const Pair DynamicFontAtSize::_find_char_with_font(CharType p_char, const Vector > &p_fallbacks) const { +const Pair DynamicFontAtSize::_find_char_with_font(CharType p_char, const Vector> &p_fallbacks) const { const Character *chr = char_map.getptr(p_char); ERR_FAIL_COND_V(!chr, (Pair(NULL, NULL))); @@ -275,7 +275,7 @@ const Pair DynamicFon return Pair(chr, const_cast(this)); } -Size2 DynamicFontAtSize::get_char_size(CharType p_char, CharType p_next, const Vector > &p_fallbacks) const { +Size2 DynamicFontAtSize::get_char_size(CharType p_char, CharType p_next, const Vector> &p_fallbacks) const { if (!valid) return Size2(1, 1); @@ -294,7 +294,7 @@ Size2 DynamicFontAtSize::get_char_size(CharType p_char, CharType p_next, const V return ret; } -float DynamicFontAtSize::draw_char(RID p_canvas_item, const Point2 &p_pos, CharType p_char, CharType p_next, const Color &p_modulate, const Vector > &p_fallbacks, bool p_advance_only, bool p_outline) const { +float DynamicFontAtSize::draw_char(RID p_canvas_item, const Point2 &p_pos, CharType p_char, CharType p_next, const Color &p_modulate, const Vector> &p_fallbacks, bool p_advance_only, bool p_outline) const { if (!valid) return 0; @@ -850,7 +850,7 @@ float DynamicFont::draw_char(RID p_canvas_item, const Point2 &p_pos, CharType p_ if (!font_at_size.is_valid()) return 0; - const Vector > &fallbacks = p_outline && outline_cache_id.outline_size > 0 ? fallback_outline_data_at_size : fallback_data_at_size; + const Vector> &fallbacks = p_outline && outline_cache_id.outline_size > 0 ? fallback_outline_data_at_size : fallback_data_at_size; Color color = p_outline && outline_cache_id.outline_size > 0 ? p_modulate * outline_color : p_modulate; // If requested outline draw, but no outline is present, simply return advance without drawing anything @@ -1025,7 +1025,7 @@ void DynamicFont::finish_dynamic_fonts() { void DynamicFont::update_oversampling() { - Vector > changed; + Vector> changed; { MutexLock lock(dynamic_font_mutex); diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h index c10f1e6681..88b1df039e 100644 --- a/scene/resources/dynamic_font.h +++ b/scene/resources/dynamic_font.h @@ -161,7 +161,7 @@ class DynamicFontAtSize : public Reference { int y; }; - const Pair _find_char_with_font(CharType p_char, const Vector > &p_fallbacks) const; + const Pair _find_char_with_font(CharType p_char, const Vector> &p_fallbacks) const; Character _make_outline_char(CharType p_char); TexturePosition _find_texture_pos_for_glyph(int p_color_size, Image::Format p_image_format, int p_width, int p_height); Character _bitmap_to_character(FT_Bitmap bitmap, int yofs, int xofs, float advance); @@ -177,7 +177,7 @@ class DynamicFontAtSize : public Reference { Ref font; DynamicFontData::CacheID id; - static HashMap > _fontdata; + static HashMap> _fontdata; Error _load(); public: @@ -188,9 +188,9 @@ public: float get_ascent() const; float get_descent() const; - Size2 get_char_size(CharType p_char, CharType p_next, const Vector > &p_fallbacks) const; + Size2 get_char_size(CharType p_char, CharType p_next, const Vector> &p_fallbacks) const; - float draw_char(RID p_canvas_item, const Point2 &p_pos, CharType p_char, CharType p_next, const Color &p_modulate, const Vector > &p_fallbacks, bool p_advance_only = false, bool p_outline = false) const; + float draw_char(RID p_canvas_item, const Point2 &p_pos, CharType p_char, CharType p_next, const Color &p_modulate, const Vector> &p_fallbacks, bool p_advance_only = false, bool p_outline = false) const; void set_texture_flags(uint32_t p_flags); void update_oversampling(); @@ -218,9 +218,9 @@ private: Ref data_at_size; Ref outline_data_at_size; - Vector > fallbacks; - Vector > fallback_data_at_size; - Vector > fallback_outline_data_at_size; + Vector> fallbacks; + Vector> fallback_data_at_size; + Vector> fallback_outline_data_at_size; DynamicFontData::CacheID cache_id; DynamicFontData::CacheID outline_cache_id; diff --git a/scene/resources/font.h b/scene/resources/font.h index 85b295b5f8..076532f390 100644 --- a/scene/resources/font.h +++ b/scene/resources/font.h @@ -108,7 +108,7 @@ class BitmapFont : public Font { GDCLASS(BitmapFont, Font); RES_BASE_EXTENSION("font"); - Vector > textures; + Vector> textures; public: struct Character { diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 5e032c41bf..f93b7ced98 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -541,15 +541,15 @@ void Mesh::clear_cache() const { debug_lines.clear(); } -Vector > Mesh::convex_decompose() const { +Vector> Mesh::convex_decompose() const { - ERR_FAIL_COND_V(!convex_composition_function, Vector >()); + ERR_FAIL_COND_V(!convex_composition_function, Vector>()); const Vector faces = get_faces(); - Vector > decomposed = convex_composition_function(faces); + Vector> decomposed = convex_composition_function(faces); - Vector > ret; + Vector> ret; for (int i = 0; i < decomposed.size(); i++) { Set points; @@ -788,7 +788,7 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) { if (d.has("index_count")) index_count = d["index_count"]; - Vector > blend_shapes; + Vector> blend_shapes; if (d.has("blend_shape_data")) { Array blend_shape_data = d["blend_shape_data"]; @@ -910,7 +910,7 @@ void ArrayMesh::_create_if_empty() const { void ArrayMesh::_set_surfaces(const Array &p_surfaces) { Vector surface_data; - Vector > surface_materials; + Vector> surface_materials; Vector surface_names; Vector surface_2d; @@ -1102,7 +1102,7 @@ void ArrayMesh::_recompute_aabb() { #ifndef _MSC_VER #warning need to add binding to add_surface using future MeshSurfaceData object #endif -void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector &p_array, int p_vertex_count, const Vector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector > &p_blend_shapes, const Vector &p_bone_aabb, const Vector &p_lods) { +void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector &p_array, int p_vertex_count, const Vector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector> &p_blend_shapes, const Vector &p_bone_aabb, const Vector &p_lods) { _create_if_empty(); @@ -1341,7 +1341,7 @@ void ArrayMesh::regen_normalmaps() { if (surfaces.size() == 0) { return; } - Vector > surfs; + Vector> surfs; for (int i = 0; i < get_surface_count(); i++) { Ref st = memnew(SurfaceTool); @@ -1379,7 +1379,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe Vector indices; Vector face_materials; Vector uv; - Vector > uv_index; + Vector> uv_index; Vector surfaces; for (int i = 0; i < get_surface_count(); i++) { @@ -1472,7 +1472,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe clear_surfaces(); //create surfacetools for each surface.. - Vector > surfaces_tools; + Vector> surfaces_tools; for (int i = 0; i < surfaces.size(); i++) { Ref st; diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index 0e356c16a6..e0cc214301 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -142,11 +142,11 @@ public: Size2 get_lightmap_size_hint() const; void clear_cache() const; - typedef Vector > (*ConvexDecompositionFunc)(const Vector &); + typedef Vector> (*ConvexDecompositionFunc)(const Vector &); static ConvexDecompositionFunc convex_composition_function; - Vector > convex_decompose() const; + Vector> convex_decompose() const; Mesh(); }; @@ -193,7 +193,7 @@ protected: public: void add_surface_from_arrays(PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), const Dictionary &p_lods = Dictionary(), uint32_t p_flags = ARRAY_COMPRESS_DEFAULT); - void add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector &p_array, int p_vertex_count, const Vector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector > &p_blend_shapes = Vector >(), const Vector &p_bone_aabbs = Vector(), const Vector &p_lods = Vector()); + void add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector &p_array, int p_vertex_count, const Vector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector> &p_blend_shapes = Vector>(), const Vector &p_bone_aabbs = Vector(), const Vector &p_lods = Vector()); Array surface_get_arrays(int p_surface) const; Array surface_get_blend_shape_arrays(int p_surface) const; diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 0538f679cc..7059682904 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -82,7 +82,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const { bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.empty(); - Map, Ref > resources_local_to_scene; + Map, Ref> resources_local_to_scene; for (int i = 0; i < nc; i++) { @@ -201,7 +201,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const { //https://github.com/godotengine/godot/issues/2958 //store old state - List > old_state; + List> old_state; if (node->get_script_instance()) { node->get_script_instance()->get_property_state(old_state); } @@ -209,7 +209,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const { node->set(snames[nprops[j].name], props[nprops[j].value], &valid); //restore old state for new script, if exists - for (List >::Element *E = old_state.front(); E; E = E->next()) { + for (List>::Element *E = old_state.front(); E; E = E->next()) { node->set(E->get().first, E->get().second); } } else { @@ -222,7 +222,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const { if (res.is_valid()) { if (res->is_local_to_scene()) { - Map, Ref >::Element *E = resources_local_to_scene.find(res); + Map, Ref>::Element *E = resources_local_to_scene.find(res); if (E) { value = E->get(); @@ -302,7 +302,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const { } } - for (Map, Ref >::Element *E = resources_local_to_scene.front(); E; E = E->next()) { + for (Map, Ref>::Element *E = resources_local_to_scene.front(); E; E = E->next()) { E->get()->setup_local_to_scene(); } diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp index 8f76c0165f..e61a1e6880 100644 --- a/scene/resources/shader.cpp +++ b/scene/resources/shader.cpp @@ -121,7 +121,7 @@ Ref Shader::get_default_texture_param(const StringName &p_param) cons void Shader::get_default_texture_param_list(List *r_textures) const { - for (const Map >::Element *E = default_textures.front(); E; E = E->next()) { + for (const Map>::Element *E = default_textures.front(); E; E = E->next()) { r_textures->push_back(E->key()); } diff --git a/scene/resources/shader.h b/scene/resources/shader.h index 5050632dd5..84908852da 100644 --- a/scene/resources/shader.h +++ b/scene/resources/shader.h @@ -59,7 +59,7 @@ private: // conversion fast and save memory. mutable bool params_cache_dirty; mutable Map params_cache; //map a shader param to a material param.. - Map > default_textures; + Map> default_textures; virtual void _update_shader() const; //used for visual shader protected: diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index cb827c4b0b..1c5b2abad2 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -370,7 +370,7 @@ Ref StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit) int sh = h; //mipmaps need to be read independently, they will be later combined - Vector > mipmap_images; + Vector> mipmap_images; int total_size = 0; bool first = true; @@ -1899,7 +1899,7 @@ uint32_t TextureLayered::get_layers() const { } Error TextureLayered::_create_from_images(const Array &p_images) { - Vector > images; + Vector> images; for (int i = 0; i < p_images.size(); i++) { Ref img = p_images[i]; ERR_FAIL_COND_V(img.is_null(), ERR_INVALID_PARAMETER); @@ -1917,7 +1917,7 @@ Array TextureLayered::_get_images() const { return images; } -Error TextureLayered::create_from_images(Vector > p_images) { +Error TextureLayered::create_from_images(Vector> p_images) { int new_layers = p_images.size(); ERR_FAIL_COND_V(new_layers == 0, ERR_INVALID_PARAMETER); @@ -2077,7 +2077,7 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String Image::Format format = Image::Format(f->get_32()); uint32_t compression = f->get_32(); // 0 - lossless (PNG), 1 - vram, 2 - uncompressed - Vector > images; + Vector> images; for (int layer = 0; layer < td; layer++) { Ref image; @@ -2087,7 +2087,7 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String //look for a PNG file inside int mipmaps = f->get_32(); - Vector > mipmap_images; + Vector> mipmap_images; for (int i = 0; i < mipmaps; i++) { uint32_t size = f->get_32(); diff --git a/scene/resources/texture.h b/scene/resources/texture.h index 237c02a8cd..1fb8742cec 100644 --- a/scene/resources/texture.h +++ b/scene/resources/texture.h @@ -376,7 +376,7 @@ public: uint32_t get_layers() const; bool has_mipmaps() const; - Error create_from_images(Vector > p_images); + Error create_from_images(Vector> p_images); void update_layer(const Ref &p_image, int p_layer); Ref get_layer_data(int p_layer) const; diff --git a/scene/resources/theme.h b/scene/resources/theme.h index 3d01f71ea0..d6d724e3f7 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -45,12 +45,12 @@ class Theme : public Resource { void _emit_theme_changed(); - HashMap > > icon_map; - HashMap > > style_map; - HashMap > > font_map; - HashMap > > shader_map; - HashMap > color_map; - HashMap > constant_map; + HashMap>> icon_map; + HashMap>> style_map; + HashMap>> font_map; + HashMap>> shader_map; + HashMap> color_map; + HashMap> constant_map; Vector _get_icon_list(const String &p_type) const; Vector _get_stylebox_list(const String &p_type) const; diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index f42b56bc83..b312aa054c 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -252,14 +252,14 @@ bool TileSet::_get(const StringName &p_name, Variant &r_ret) const { r_ret = p; } else if (what == "occluder_map") { Array p; - for (Map >::Element *E = tile_map[id].autotile_data.occluder_map.front(); E; E = E->next()) { + for (Map>::Element *E = tile_map[id].autotile_data.occluder_map.front(); E; E = E->next()) { p.push_back(E->key()); p.push_back(E->value()); } r_ret = p; } else if (what == "navpoly_map") { Array p; - for (Map >::Element *E = tile_map[id].autotile_data.navpoly_map.front(); E; E = E->next()) { + for (Map>::Element *E = tile_map[id].autotile_data.navpoly_map.front(); E; E = E->next()) { p.push_back(E->key()); p.push_back(E->value()); } @@ -903,9 +903,9 @@ Ref TileSet::tile_get_navigation_polygon(int p_id) const { return tile_map[p_id].navigation_polygon; } -const Map > &TileSet::autotile_get_light_oclusion_map(int p_id) const { +const Map> &TileSet::autotile_get_light_oclusion_map(int p_id) const { - static Map > dummy; + static Map> dummy; ERR_FAIL_COND_V(!tile_map.has(p_id), dummy); return tile_map[p_id].autotile_data.occluder_map; } @@ -932,9 +932,9 @@ Ref TileSet::autotile_get_navigation_polygon(int p_id, const } } -const Map > &TileSet::autotile_get_navigation_map(int p_id) const { +const Map> &TileSet::autotile_get_navigation_map(int p_id) const { - static Map > dummy; + static Map> dummy; ERR_FAIL_COND_V(!tile_map.has(p_id), dummy); return tile_map[p_id].autotile_data.navpoly_map; } @@ -1077,7 +1077,7 @@ void TileSet::_decompose_convex_shape(Ref p_shape) { Ref convex = p_shape; if (!convex.is_valid()) return; - Vector > decomp = Geometry::decompose_polygon_in_convex(convex->get_points()); + Vector> decomp = Geometry::decompose_polygon_in_convex(convex->get_points()); if (decomp.size() > 1) { Array sub_shapes; for (int i = 0; i < decomp.size(); i++) { diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h index 8b540982a4..3c964ec667 100644 --- a/scene/resources/tile_set.h +++ b/scene/resources/tile_set.h @@ -97,8 +97,8 @@ public: int spacing; Vector2 icon_coord; Map flags; - Map > occluder_map; - Map > navpoly_map; + Map> occluder_map; + Map> navpoly_map; Map priority_map; Map z_index_map; @@ -233,7 +233,7 @@ public: void autotile_set_light_occluder(int p_id, const Ref &p_light_occluder, const Vector2 &p_coord); Ref autotile_get_light_occluder(int p_id, const Vector2 &p_coord) const; - const Map > &autotile_get_light_oclusion_map(int p_id) const; + const Map> &autotile_get_light_oclusion_map(int p_id) const; void tile_set_navigation_polygon_offset(int p_id, const Vector2 &p_offset); Vector2 tile_get_navigation_polygon_offset(int p_id) const; @@ -243,7 +243,7 @@ public: void autotile_set_navigation_polygon(int p_id, const Ref &p_navigation_polygon, const Vector2 &p_coord); Ref autotile_get_navigation_polygon(int p_id, const Vector2 &p_coord) const; - const Map > &autotile_get_navigation_map(int p_id) const; + const Map> &autotile_get_navigation_map(int p_id) const; void tile_set_z_index(int p_id, int p_z_index); int tile_get_z_index(int p_id) const; -- cgit v1.2.3