summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/animation.cpp2
-rw-r--r--scene/resources/animation.h12
-rw-r--r--scene/resources/bit_map.cpp6
-rw-r--r--scene/resources/bit_map.h2
-rw-r--r--scene/resources/curve.cpp4
-rw-r--r--scene/resources/default_theme/default_theme.cpp2
-rw-r--r--scene/resources/dynamic_font.cpp12
-rw-r--r--scene/resources/dynamic_font.h14
-rw-r--r--scene/resources/font.h2
-rw-r--r--scene/resources/mesh.cpp20
-rw-r--r--scene/resources/mesh.h6
-rw-r--r--scene/resources/packed_scene.cpp10
-rw-r--r--scene/resources/shader.cpp2
-rw-r--r--scene/resources/shader.h2
-rw-r--r--scene/resources/texture.cpp10
-rw-r--r--scene/resources/texture.h2
-rw-r--r--scene/resources/theme.h12
-rw-r--r--scene/resources/tile_set.cpp14
-rw-r--r--scene/resources/tile_set.h8
19 files changed, 71 insertions, 71 deletions
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;