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/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 ++++---- 19 files changed, 71 insertions(+), 71 deletions(-) (limited to 'scene/resources') 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