diff options
Diffstat (limited to 'scene')
44 files changed, 125 insertions, 125 deletions
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<Ref<Texture2D> > frames; + Vector<Ref<Texture2D>> 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<Vector<Vector2> > decomp = _decompose_in_convex(); + Vector<Vector<Vector2>> decomp = _decompose_in_convex(); for (int i = 0; i < decomp.size(); i++) { Ref<ConvexPolygonShape2D> convex = memnew(ConvexPolygonShape2D); convex->set_points(decomp[i]); @@ -76,8 +76,8 @@ void CollisionPolygon2D::_build_polygon() { } } -Vector<Vector<Vector2> > CollisionPolygon2D::_decompose_in_convex() { - Vector<Vector<Vector2> > decomp = Geometry::decompose_polygon_in_convex(polygon); +Vector<Vector<Vector2>> CollisionPolygon2D::_decompose_in_convex() { + Vector<Vector<Vector2>> 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<Vector<Vector2> > decomp = _decompose_in_convex(); + Vector<Vector<Vector2>> 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<Vector<Vector2> > _decompose_in_convex(); + Vector<Vector<Vector2>> _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<int> indices; }; Vector<Polygon> polygons; - Vector<Vector<Vector2> > outlines; + Vector<Vector<Vector2>> 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<Collision> colliders; - Vector<Ref<KinematicCollision2D> > slide_colliders; + Vector<Ref<KinematicCollision2D>> slide_colliders; Ref<KinematicCollision2D> 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<Vector<Vector2> > decomp = Geometry::decompose_polygon_in_convex(polygon); + Vector<Vector<Vector2>> 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<Material> override_material; - Vector<Ref<Material> > instance_materials; + Vector<Ref<Material>> instance_materials; Ref<Mesh> 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<Ref<Texture2D> > cached_textures; + List<Ref<Texture2D>> 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<StringName, BlendShapeTrack> blend_shape_tracks; - Vector<Ref<Material> > materials; + Vector<Ref<Material>> 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<Ref<Mesh> > draw_passes; + Vector<Ref<Mesh>> 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<Collision> colliders; - Vector<Ref<KinematicCollision> > slide_colliders; + Vector<Ref<KinematicCollision>> slide_colliders; Ref<KinematicCollision> 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<StandardMaterial3D> line_material = static_cast<Ref<StandardMaterial3D> >(debug_material); + Ref<StandardMaterial3D> line_material = static_cast<Ref<StandardMaterial3D>>(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<StandardMaterial3D>(memnew(StandardMaterial3D)); - Ref<StandardMaterial3D> line_material = static_cast<Ref<StandardMaterial3D> >(debug_material); + Ref<StandardMaterial3D> line_material = static_cast<Ref<StandardMaterial3D>>(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<Ref<Material> > copy_materials; + Vector<Ref<Material>> 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<Material> p_material return mc; } -void Voxelizer::plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, const Vector<Ref<Material> > &p_materials, const Ref<Material> &p_override_material) { +void Voxelizer::plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, const Vector<Ref<Material>> &p_materials, const Ref<Material> &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<Mesh> &p_mesh, const Vector<Ref<Material> > &p_materials, const Ref<Material> &p_override_material); + void plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, const Vector<Ref<Material>> &p_materials, const Ref<Material> &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<PropertyInfo> properties; - HashMap<StringName, HashMap<StringName, StringName> > property_parent_map; + HashMap<StringName, HashMap<StringName, StringName>> property_parent_map; HashMap<StringName, Variant> property_map; struct Activity { @@ -293,7 +293,7 @@ private: float activity; }; - HashMap<StringName, Vector<Activity> > input_activity_map; + HashMap<StringName, Vector<Activity>> input_activity_map; HashMap<StringName, Vector<Activity> *> input_activity_map_get; void _update_properties_for_node(const String &p_base_path, Ref<AnimationNode> 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<String, Set<Node *> > &edit_cache = debugger->live_scene_edit_cache; - Map<String, Set<Node *> >::Element *E = edit_cache.find(p_filename); + Map<String, Set<Node *>> &edit_cache = debugger->live_scene_edit_cache; + Map<String, Set<Node *>>::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<Node *, Map<ObjectID, Node *> > &remove_list = debugger->live_edit_remove_list; - Map<Node *, Map<ObjectID, Node *> >::Element *F = remove_list.find(p_node); + Map<Node *, Map<ObjectID, Node *>> &remove_list = debugger->live_edit_remove_list; + Map<Node *, Map<ObjectID, Node *>>::Element *F = remove_list.find(p_node); if (F) { for (Map<ObjectID, Node *>::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<const Script *, Set<StringName> > ScriptMemberMap; - typedef Map<const Script *, Map<StringName, Variant> > ScriptConstantsMap; + typedef Map<const Script *, Set<StringName>> ScriptMemberMap; + typedef Map<const Script *, Map<StringName, Variant>> 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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<Node *, Map<ObjectID, Node *> >::Element *EN = live_edit_remove_list.find(n); + Map<Node *, Map<ObjectID, Node *>>::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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<String, Set<Node *> >::Element *E = live_scene_edit_cache.find(live_edit_scene); + Map<String, Set<Node *>>::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<String, Set<Node *> > live_scene_edit_cache; - Map<Node *, Map<ObjectID, Node *> > live_edit_remove_list; + Map<String, Set<Node *>> live_scene_edit_cache; + Map<Node *, Map<ObjectID, Node *>> 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<StringName, Ref<Texture2D> > icon_override; - HashMap<StringName, Ref<Shader> > shader_override; - HashMap<StringName, Ref<StyleBox> > style_override; - HashMap<StringName, Ref<Font> > font_override; + HashMap<StringName, Ref<Texture2D>> icon_override; + HashMap<StringName, Ref<Shader>> shader_override; + HashMap<StringName, Ref<StyleBox>> style_override; + HashMap<StringName, Ref<Font>> font_override; HashMap<StringName, Color> color_override; HashMap<StringName, int> 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<Ref<RichTextEffect> > custom_effects; + Vector<Ref<RichTextEffect>> 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<int, int> color_region_cache; - Map<int, Map<int, HighlighterInfo> > syntax_highlighting_cache; + Map<int, Map<int, HighlighterInfo>> 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<UGCall, Vector<Variant> >::Element *E = unique_group_calls.front(); + Map<UGCall, Vector<Variant>>::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<Ref<SceneTreeTimer> >::Element *L = timers.back(); //last element + List<Ref<SceneTreeTimer>>::Element *L = timers.back(); //last element - for (List<Ref<SceneTreeTimer> >::Element *E = timers.front(); E;) { + for (List<Ref<SceneTreeTimer>>::Element *E = timers.front(); E;) { - List<Ref<SceneTreeTimer> >::Element *N = E->next(); + List<Ref<SceneTreeTimer>>::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<Ref<SceneTreeTimer> >::Element *E = timers.front(); E; E = E->next()) { + for (List<Ref<SceneTreeTimer>>::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<ObjectID> delete_queue; - Map<UGCall, Vector<Variant> > unique_group_calls; + Map<UGCall, Vector<Variant>> 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<Ref<SceneTreeTimer> > timers; + List<Ref<SceneTreeTimer>> 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<Ref<InputEvent> >::Element *E = physics_picking_events.front(); E; E = E->next()) { + for (List<Ref<InputEvent>>::Element *E = physics_picking_events.front(); E; E = E->next()) { Ref<InputEventMouse> 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<Ref<InputEvent> > physics_picking_events; + List<Ref<InputEvent>> 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 <class T> -T Animation::_interpolate(const Vector<TKey<T> > &p_keys, float p_time, InterpolationType p_interp, bool p_loop_wrap, bool *p_ok) const { +T Animation::_interpolate(const Vector<TKey<T>> &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<TKey<TransformKey> > transforms; + Vector<TKey<TransformKey>> transforms; TransformTrack() { type = TYPE_TRANSFORM; } }; @@ -116,7 +116,7 @@ private: UpdateMode update_mode; bool update_on_seek; - Vector<TKey<Variant> > values; + Vector<TKey<Variant>> values; ValueTrack() { type = TYPE_VALUE; @@ -148,7 +148,7 @@ private: struct BezierTrack : public Track { - Vector<TKey<BezierKey> > values; + Vector<TKey<BezierKey>> values; BezierTrack() { type = TYPE_BEZIER; @@ -169,7 +169,7 @@ private: struct AudioTrack : public Track { - Vector<TKey<AudioKey> > values; + Vector<TKey<AudioKey>> values; AudioTrack() { type = TYPE_AUDIO; @@ -180,7 +180,7 @@ private: struct AnimationTrack : public Track { - Vector<TKey<StringName> > values; + Vector<TKey<StringName>> 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 <class T> - _FORCE_INLINE_ T _interpolate(const Vector<TKey<T> > &p_keys, float p_time, InterpolationType p_interp, bool p_loop_wrap, bool *p_ok) const; + _FORCE_INLINE_ T _interpolate(const Vector<TKey<T>> &p_keys, float p_time, InterpolationType p_interp, bool p_loop_wrap, bool *p_ok) const; template <class T> _FORCE_INLINE_ void _track_get_key_indices_in_range(const Vector<T> &p_array, float from_time, float to_time, List<int> *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<BitMap> &p_map, const Point2i &p_ print_verbose("BitMap: Max stack size: " + itos(stack.size())); } -Vector<Vector<Vector2> > BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon) const { +Vector<Vector<Vector2>> 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<Vector<Vector2> > BitMap::clip_opaque_to_polygons(const Rect2 &p_rect, fl fill.instance(); fill->create(get_size()); - Vector<Vector<Vector2> > polygons; + Vector<Vector<Vector2>> 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<Vector<Vector2> > result = clip_opaque_to_polygons(p_rect, p_epsilon); + Vector<Vector<Vector2>> 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<BitMap> &p_bitmap); Ref<Image> convert_to_image() const; - Vector<Vector<Vector2> > clip_opaque_to_polygons(const Rect2 &p_rect, float p_epsilon = 2.0) const; + Vector<Vector<Vector2>> 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<Map<float, Vector2> > midpoints; + Vector<Map<float, Vector2>> 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<Map<float, Vector3> > midpoints; + Vector<Map<float, Vector3>> 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<const void *, Ref<ImageTexture> > TexCacheMap; +typedef Map<const void *, Ref<ImageTexture>> 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<String, Vector<uint8_t> > DynamicFontAtSize::_fontdata; +HashMap<String, Vector<uint8_t>> DynamicFontAtSize::_fontdata; Error DynamicFontAtSize::_load() { @@ -243,7 +243,7 @@ float DynamicFontAtSize::get_descent() const { return descent; } -const Pair<const DynamicFontAtSize::Character *, DynamicFontAtSize *> DynamicFontAtSize::_find_char_with_font(CharType p_char, const Vector<Ref<DynamicFontAtSize> > &p_fallbacks) const { +const Pair<const DynamicFontAtSize::Character *, DynamicFontAtSize *> DynamicFontAtSize::_find_char_with_font(CharType p_char, const Vector<Ref<DynamicFontAtSize>> &p_fallbacks) const { const Character *chr = char_map.getptr(p_char); ERR_FAIL_COND_V(!chr, (Pair<const Character *, DynamicFontAtSize *>(NULL, NULL))); @@ -275,7 +275,7 @@ const Pair<const DynamicFontAtSize::Character *, DynamicFontAtSize *> DynamicFon return Pair<const Character *, DynamicFontAtSize *>(chr, const_cast<DynamicFontAtSize *>(this)); } -Size2 DynamicFontAtSize::get_char_size(CharType p_char, CharType p_next, const Vector<Ref<DynamicFontAtSize> > &p_fallbacks) const { +Size2 DynamicFontAtSize::get_char_size(CharType p_char, CharType p_next, const Vector<Ref<DynamicFontAtSize>> &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<Ref<DynamicFontAtSize> > &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<Ref<DynamicFontAtSize>> &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<Ref<DynamicFontAtSize> > &fallbacks = p_outline && outline_cache_id.outline_size > 0 ? fallback_outline_data_at_size : fallback_data_at_size; + const Vector<Ref<DynamicFontAtSize>> &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<Ref<DynamicFont> > changed; + Vector<Ref<DynamicFont>> 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<const Character *, DynamicFontAtSize *> _find_char_with_font(CharType p_char, const Vector<Ref<DynamicFontAtSize> > &p_fallbacks) const; + const Pair<const Character *, DynamicFontAtSize *> _find_char_with_font(CharType p_char, const Vector<Ref<DynamicFontAtSize>> &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<DynamicFontData> font; DynamicFontData::CacheID id; - static HashMap<String, Vector<uint8_t> > _fontdata; + static HashMap<String, Vector<uint8_t>> _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<Ref<DynamicFontAtSize> > &p_fallbacks) const; + Size2 get_char_size(CharType p_char, CharType p_next, const Vector<Ref<DynamicFontAtSize>> &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<Ref<DynamicFontAtSize> > &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<Ref<DynamicFontAtSize>> &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<DynamicFontAtSize> data_at_size; Ref<DynamicFontAtSize> outline_data_at_size; - Vector<Ref<DynamicFontData> > fallbacks; - Vector<Ref<DynamicFontAtSize> > fallback_data_at_size; - Vector<Ref<DynamicFontAtSize> > fallback_outline_data_at_size; + Vector<Ref<DynamicFontData>> fallbacks; + Vector<Ref<DynamicFontAtSize>> fallback_data_at_size; + Vector<Ref<DynamicFontAtSize>> 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<Ref<Texture2D> > textures; + Vector<Ref<Texture2D>> 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<Ref<Shape> > Mesh::convex_decompose() const { +Vector<Ref<Shape>> Mesh::convex_decompose() const { - ERR_FAIL_COND_V(!convex_composition_function, Vector<Ref<Shape> >()); + ERR_FAIL_COND_V(!convex_composition_function, Vector<Ref<Shape>>()); const Vector<Face3> faces = get_faces(); - Vector<Vector<Face3> > decomposed = convex_composition_function(faces); + Vector<Vector<Face3>> decomposed = convex_composition_function(faces); - Vector<Ref<Shape> > ret; + Vector<Ref<Shape>> ret; for (int i = 0; i < decomposed.size(); i++) { Set<Vector3> 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<Vector<uint8_t> > blend_shapes; + Vector<Vector<uint8_t>> 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<VS::SurfaceData> surface_data; - Vector<Ref<Material> > surface_materials; + Vector<Ref<Material>> surface_materials; Vector<String> surface_names; Vector<bool> 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<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabb, const Vector<VS::SurfaceData::LOD> &p_lods) { +void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t>> &p_blend_shapes, const Vector<AABB> &p_bone_aabb, const Vector<VS::SurfaceData::LOD> &p_lods) { _create_if_empty(); @@ -1341,7 +1341,7 @@ void ArrayMesh::regen_normalmaps() { if (surfaces.size() == 0) { return; } - Vector<Ref<SurfaceTool> > surfs; + Vector<Ref<SurfaceTool>> surfs; for (int i = 0; i < get_surface_count(); i++) { Ref<SurfaceTool> st = memnew(SurfaceTool); @@ -1379,7 +1379,7 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe Vector<int> indices; Vector<int> face_materials; Vector<float> uv; - Vector<Pair<int, int> > uv_index; + Vector<Pair<int, int>> uv_index; Vector<ArrayMeshLightmapSurface> 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<Ref<SurfaceTool> > surfaces_tools; + Vector<Ref<SurfaceTool>> surfaces_tools; for (int i = 0; i < surfaces.size(); i++) { Ref<SurfaceTool> 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<Vector<Face3> > (*ConvexDecompositionFunc)(const Vector<Face3> &); + typedef Vector<Vector<Face3>> (*ConvexDecompositionFunc)(const Vector<Face3> &); static ConvexDecompositionFunc convex_composition_function; - Vector<Ref<Shape> > convex_decompose() const; + Vector<Ref<Shape>> 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<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>(), const Vector<VS::SurfaceData::LOD> &p_lods = Vector<VS::SurfaceData::LOD>()); + void add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t>> &p_blend_shapes = Vector<Vector<uint8_t>>(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>(), const Vector<VS::SurfaceData::LOD> &p_lods = Vector<VS::SurfaceData::LOD>()); 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<Resource>, Ref<Resource> > resources_local_to_scene; + Map<Ref<Resource>, Ref<Resource>> 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<Pair<StringName, Variant> > old_state; + List<Pair<StringName, Variant>> 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<Pair<StringName, Variant> >::Element *E = old_state.front(); E; E = E->next()) { + for (List<Pair<StringName, Variant>>::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<Resource>, Ref<Resource> >::Element *E = resources_local_to_scene.find(res); + Map<Ref<Resource>, Ref<Resource>>::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<Resource>, Ref<Resource> >::Element *E = resources_local_to_scene.front(); E; E = E->next()) { + for (Map<Ref<Resource>, Ref<Resource>>::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<Texture2D> Shader::get_default_texture_param(const StringName &p_param) cons void Shader::get_default_texture_param_list(List<StringName> *r_textures) const { - for (const Map<StringName, Ref<Texture2D> >::Element *E = default_textures.front(); E; E = E->next()) { + for (const Map<StringName, Ref<Texture2D>>::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<StringName, StringName> params_cache; //map a shader param to a material param.. - Map<StringName, Ref<Texture2D> > default_textures; + Map<StringName, Ref<Texture2D>> 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<Image> 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<Ref<Image> > mipmap_images; + Vector<Ref<Image>> 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<Ref<Image> > images; + Vector<Ref<Image>> images; for (int i = 0; i < p_images.size(); i++) { Ref<Image> 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<Ref<Image> > p_images) { +Error TextureLayered::create_from_images(Vector<Ref<Image>> 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<Ref<Image> > images; + Vector<Ref<Image>> images; for (int layer = 0; layer < td; layer++) { Ref<Image> 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<Ref<Image> > mipmap_images; + Vector<Ref<Image>> 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<Ref<Image> > p_images); + Error create_from_images(Vector<Ref<Image>> p_images); void update_layer(const Ref<Image> &p_image, int p_layer); Ref<Image> 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<StringName, HashMap<StringName, Ref<Texture2D> > > icon_map; - HashMap<StringName, HashMap<StringName, Ref<StyleBox> > > style_map; - HashMap<StringName, HashMap<StringName, Ref<Font> > > font_map; - HashMap<StringName, HashMap<StringName, Ref<Shader> > > shader_map; - HashMap<StringName, HashMap<StringName, Color> > color_map; - HashMap<StringName, HashMap<StringName, int> > constant_map; + HashMap<StringName, HashMap<StringName, Ref<Texture2D>>> icon_map; + HashMap<StringName, HashMap<StringName, Ref<StyleBox>>> style_map; + HashMap<StringName, HashMap<StringName, Ref<Font>>> font_map; + HashMap<StringName, HashMap<StringName, Ref<Shader>>> shader_map; + HashMap<StringName, HashMap<StringName, Color>> color_map; + HashMap<StringName, HashMap<StringName, int>> constant_map; Vector<String> _get_icon_list(const String &p_type) const; Vector<String> _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<Vector2, Ref<OccluderPolygon2D> >::Element *E = tile_map[id].autotile_data.occluder_map.front(); E; E = E->next()) { + for (Map<Vector2, Ref<OccluderPolygon2D>>::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<Vector2, Ref<NavigationPolygon> >::Element *E = tile_map[id].autotile_data.navpoly_map.front(); E; E = E->next()) { + for (Map<Vector2, Ref<NavigationPolygon>>::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<NavigationPolygon> TileSet::tile_get_navigation_polygon(int p_id) const { return tile_map[p_id].navigation_polygon; } -const Map<Vector2, Ref<OccluderPolygon2D> > &TileSet::autotile_get_light_oclusion_map(int p_id) const { +const Map<Vector2, Ref<OccluderPolygon2D>> &TileSet::autotile_get_light_oclusion_map(int p_id) const { - static Map<Vector2, Ref<OccluderPolygon2D> > dummy; + static Map<Vector2, Ref<OccluderPolygon2D>> 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<NavigationPolygon> TileSet::autotile_get_navigation_polygon(int p_id, const } } -const Map<Vector2, Ref<NavigationPolygon> > &TileSet::autotile_get_navigation_map(int p_id) const { +const Map<Vector2, Ref<NavigationPolygon>> &TileSet::autotile_get_navigation_map(int p_id) const { - static Map<Vector2, Ref<NavigationPolygon> > dummy; + static Map<Vector2, Ref<NavigationPolygon>> 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<Shape2D> p_shape) { Ref<ConvexPolygonShape2D> convex = p_shape; if (!convex.is_valid()) return; - Vector<Vector<Vector2> > decomp = Geometry::decompose_polygon_in_convex(convex->get_points()); + Vector<Vector<Vector2>> 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<Vector2, uint32_t> flags; - Map<Vector2, Ref<OccluderPolygon2D> > occluder_map; - Map<Vector2, Ref<NavigationPolygon> > navpoly_map; + Map<Vector2, Ref<OccluderPolygon2D>> occluder_map; + Map<Vector2, Ref<NavigationPolygon>> navpoly_map; Map<Vector2, int> priority_map; Map<Vector2, int> z_index_map; @@ -233,7 +233,7 @@ public: void autotile_set_light_occluder(int p_id, const Ref<OccluderPolygon2D> &p_light_occluder, const Vector2 &p_coord); Ref<OccluderPolygon2D> autotile_get_light_occluder(int p_id, const Vector2 &p_coord) const; - const Map<Vector2, Ref<OccluderPolygon2D> > &autotile_get_light_oclusion_map(int p_id) const; + const Map<Vector2, Ref<OccluderPolygon2D>> &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<NavigationPolygon> &p_navigation_polygon, const Vector2 &p_coord); Ref<NavigationPolygon> autotile_get_navigation_polygon(int p_id, const Vector2 &p_coord) const; - const Map<Vector2, Ref<NavigationPolygon> > &autotile_get_navigation_map(int p_id) const; + const Map<Vector2, Ref<NavigationPolygon>> &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; |