diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-17 07:33:00 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-17 07:36:24 +0100 |
commit | cb282c6ef0bb91957f8a6f422705813bd47c788c (patch) | |
tree | 7eba92b08fc89f46f1b7402b86372cfcc82486db /editor/import | |
parent | c5d76139dc9c5721e09e0e782bed5ccf1789554b (diff) |
Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.
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`.
Diffstat (limited to 'editor/import')
-rw-r--r-- | editor/import/editor_import_collada.cpp | 20 | ||||
-rw-r--r-- | editor/import/editor_scene_importer_gltf.cpp | 2 | ||||
-rw-r--r-- | editor/import/editor_scene_importer_gltf.h | 8 | ||||
-rw-r--r-- | editor/import/resource_importer_csv_translation.cpp | 2 | ||||
-rw-r--r-- | editor/import/resource_importer_obj.cpp | 14 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 40 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.h | 8 | ||||
-rw-r--r-- | editor/import/resource_importer_texture_atlas.cpp | 8 | ||||
-rw-r--r-- | editor/import/resource_importer_texture_atlas.h | 4 |
9 files changed, 53 insertions, 53 deletions
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 2f97f4aa31..3cc6e7a50c 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -49,7 +49,7 @@ struct ColladaImport { Collada collada; Spatial *scene; - Vector<Ref<Animation> > animations; + Vector<Ref<Animation>> animations; struct NodeMap { //String path; @@ -73,12 +73,12 @@ struct ColladaImport { Map<String, NodeMap> node_map; //map from collada node to engine node Map<String, String> node_name_map; //map from collada node to engine node - Map<String, Ref<ArrayMesh> > mesh_cache; - Map<String, Ref<Curve3D> > curve_cache; - Map<String, Ref<Material> > material_cache; + Map<String, Ref<ArrayMesh>> mesh_cache; + Map<String, Ref<Curve3D>> curve_cache; + Map<String, Ref<Material>> material_cache; Map<Collada::Node *, Skeleton *> skeleton_map; - Map<Skeleton *, Map<String, int> > skeleton_bone_map; + Map<Skeleton *, Map<String, int>> skeleton_bone_map; Set<String> valid_animated_nodes; Vector<int> valid_animated_properties; @@ -89,7 +89,7 @@ struct ColladaImport { Error _create_scene(Collada::Node *p_node, Spatial *p_parent); Error _create_resources(Collada::Node *p_node, bool p_use_compression); Error _create_material(const String &p_target); - Error _create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh> > p_morph_meshes = Vector<Ref<ArrayMesh> >(), bool p_use_compression = false, bool p_use_mesh_material = false); + Error _create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh>> p_morph_meshes = Vector<Ref<ArrayMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false); Error load(const String &p_path, int p_flags, bool p_force_make_tangents = false, bool p_use_compression = false); void _fix_param_animation_tracks(); void create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks); @@ -489,7 +489,7 @@ Error ColladaImport::_create_material(const String &p_target) { return OK; } -Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh> > p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { +Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) { bool local_xform_mirror = p_local_xform.basis.determinant() < 0; @@ -608,7 +608,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me /* ADD WEIGHTS IF EXIST */ /************************/ - Map<int, Vector<Collada::Vertex::Weight> > pre_weights; + Map<int, Vector<Collada::Vertex::Weight>> pre_weights; bool has_weights = false; @@ -1096,7 +1096,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres String meshid; Transform apply_xform; Vector<int> bone_remap; - Vector<Ref<ArrayMesh> > morphs; + Vector<Ref<ArrayMesh>> morphs; if (ng2->controller) { @@ -1173,7 +1173,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres Ref<ArrayMesh> mesh = Ref<ArrayMesh>(memnew(ArrayMesh)); const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid2]; mesh->set_name(meshdata.name); - Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, NULL, Vector<Ref<ArrayMesh> >(), false); + Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, NULL, Vector<Ref<ArrayMesh>>(), false); ERR_FAIL_COND_V(err, err); morphs.push_back(mesh); diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 731d094745..398fc9ff49 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -1838,7 +1838,7 @@ Error EditorSceneImporterGLTF::_determine_skeletons(GLTFState &state) { skeleton_sets.get_representatives(groups_representatives); Vector<GLTFNodeIndex> highest_group_members; - Vector<Vector<GLTFNodeIndex> > groups; + Vector<Vector<GLTFNodeIndex>> groups; for (int i = 0; i < groups_representatives.size(); ++i) { Vector<GLTFNodeIndex> group; skeleton_sets.get_members(group, groups_representatives[i]); diff --git a/editor/import/editor_scene_importer_gltf.h b/editor/import/editor_scene_importer_gltf.h index 5d2711483b..9f354fde2d 100644 --- a/editor/import/editor_scene_importer_gltf.h +++ b/editor/import/editor_scene_importer_gltf.h @@ -284,7 +284,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { Channel<Vector3> translation_track; Channel<Quat> rotation_track; Channel<Vector3> scale_track; - Vector<Channel<float> > weight_tracks; + Vector<Channel<float>> weight_tracks; }; String name; @@ -302,18 +302,18 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { bool use_named_skin_binds; Vector<GLTFNode *> nodes; - Vector<Vector<uint8_t> > buffers; + Vector<Vector<uint8_t>> buffers; Vector<GLTFBufferView> buffer_views; Vector<GLTFAccessor> accessors; Vector<GLTFMesh> meshes; //meshes are loaded directly, no reason not to. - Vector<Ref<Material> > materials; + Vector<Ref<Material>> materials; String scene_name; Vector<int> root_nodes; Vector<GLTFTexture> textures; - Vector<Ref<Texture2D> > images; + Vector<Ref<Texture2D>> images; Vector<GLTFSkin> skins; Vector<GLTFCamera> cameras; diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index 3119fb088b..1d7bed3975 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -96,7 +96,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const ERR_FAIL_COND_V(line.size() <= 1, ERR_PARSE_ERROR); Vector<String> locales; - Vector<Ref<Translation> > translations; + Vector<Ref<Translation>> translations; for (int i = 1; i < line.size(); i++) { diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 7fd3bcc478..fb1782cb65 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -42,7 +42,7 @@ uint32_t EditorOBJImporter::get_import_flags() const { return IMPORT_SCENE; } -static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D> > &material_map, List<String> *r_missing_deps) { +static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D>> &material_map, List<String> *r_missing_deps) { FileAccessRef f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open MTL file '%s', it may not exist or not be readable.", p_path)); @@ -203,7 +203,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand return OK; } -static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p_single_mesh, bool p_generate_tangents, bool p_optimize, Vector3 p_scale_mesh, Vector3 p_offset_mesh, List<String> *r_missing_deps) { +static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_single_mesh, bool p_generate_tangents, bool p_optimize, Vector3 p_scale_mesh, Vector3 p_offset_mesh, List<String> *r_missing_deps) { FileAccessRef f = FileAccess::open(p_path, FileAccess::READ); ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open OBJ file '%s', it may not exist or not be readable.", p_path)); @@ -221,7 +221,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p Vector<Vector2> uvs; String name; - Map<String, Map<String, Ref<StandardMaterial3D> > > material_map; + Map<String, Map<String, Ref<StandardMaterial3D>>> material_map; Ref<SurfaceTool> surf_tool = memnew(SurfaceTool); surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES); @@ -397,7 +397,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p current_material_library = l.replace("mtllib", "").strip_edges(); if (!material_map.has(current_material_library)) { - Map<String, Ref<StandardMaterial3D> > lib; + Map<String, Ref<StandardMaterial3D>> lib; Error err = _parse_material_library(current_material_library, lib, r_missing_deps); if (err == ERR_CANT_OPEN) { String dir = p_path.get_base_dir(); @@ -420,7 +420,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) { - List<Ref<Mesh> > meshes; + List<Ref<Mesh>> meshes; Error err = _parse_obj(p_path, meshes, false, p_flags & IMPORT_GENERATE_TANGENT_ARRAYS, p_flags & IMPORT_USE_COMPRESSION, Vector3(1, 1, 1), Vector3(0, 0, 0), r_missing_deps); @@ -433,7 +433,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in Spatial *scene = memnew(Spatial); - for (List<Ref<Mesh> >::Element *E = meshes.front(); E; E = E->next()) { + for (List<Ref<Mesh>>::Element *E = meshes.front(); E; E = E->next()) { MeshInstance *mi = memnew(MeshInstance); mi->set_mesh(E->get()); @@ -500,7 +500,7 @@ bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Ma Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) { - List<Ref<Mesh> > meshes; + List<Ref<Mesh>> meshes; Error err = _parse_obj(p_source_file, meshes, true, p_options["generate_tangents"], p_options["optimize_mesh"], p_options["scale_mesh"], p_options["offset_mesh"], NULL); diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 5651197fa3..94a6fee6b7 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -170,7 +170,7 @@ String ResourceImporterScene::get_visible_name() const { void ResourceImporterScene::get_recognized_extensions(List<String> *p_extensions) const { - for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { E->get()->get_extensions(p_extensions); } } @@ -276,7 +276,7 @@ static String _fixstr(const String &p_what, const String &p_str) { return what; } -static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_list, bool p_convex) { +static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape>> &r_shape_list, bool p_convex) { if (!p_convex) { @@ -284,7 +284,7 @@ static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_li r_shape_list.push_back(shape); } else { - Vector<Ref<Shape> > cd = mesh->convex_decompose(); + Vector<Ref<Shape>> cd = mesh->convex_decompose(); if (cd.size()) { for (int i = 0; i < cd.size(); i++) { r_shape_list.push_back(cd[i]); @@ -293,7 +293,7 @@ static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_li } } -Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape> > > &collision_map, LightBakeMode p_light_bake_mode) { +Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape>>> &collision_map, LightBakeMode p_light_bake_mode) { // children first for (int i = 0; i < p_node->get_child_count(); i++) { @@ -382,7 +382,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { - List<Ref<Shape> > shapes; + List<Ref<Shape>> shapes; String fixed_name; if (collision_map.has(mesh)) { shapes = collision_map[mesh]; @@ -412,7 +412,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> p_node = col; int idx = 0; - for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) { + for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(E->get()); @@ -468,7 +468,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { - List<Ref<Shape> > shapes; + List<Ref<Shape>> shapes; if (collision_map.has(mesh)) { shapes = collision_map[mesh]; } else { @@ -486,7 +486,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> mi->set_owner(rigid_body->get_owner()); int idx = 0; - for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) { + for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(E->get()); @@ -505,7 +505,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { - List<Ref<Shape> > shapes; + List<Ref<Shape>> shapes; String fixed_name; if (collision_map.has(mesh)) { shapes = collision_map[mesh]; @@ -536,7 +536,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> col->set_owner(mi->get_owner()); int idx = 0; - for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) { + for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(E->get()); @@ -618,7 +618,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<ArrayMesh> mesh = mi->get_mesh(); if (!mesh.is_null()) { - List<Ref<Shape> > shapes; + List<Ref<Shape>> shapes; if (collision_map.has(mesh)) { shapes = collision_map[mesh]; } else if (_teststr(mesh->get_name(), "col")) { @@ -638,7 +638,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> col->set_owner(p_node->get_owner()); int idx = 0; - for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) { + for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) { CollisionShape *cshape = memnew(CollisionShape); cshape->set_shape(E->get()); @@ -957,7 +957,7 @@ void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Trans } } -void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation> > &p_animations, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes) { +void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation>> &p_animations, Map<Ref<Material>, Ref<Material>> &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh>> &p_meshes) { List<PropertyInfo> pi; @@ -1209,7 +1209,7 @@ Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneImporte Ref<EditorSceneImporter> importer; String ext = p_path.get_extension().to_lower(); - for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { if (E->get().ptr() == p_exception) continue; @@ -1241,7 +1241,7 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito Ref<EditorSceneImporter> importer; String ext = p_path.get_extension().to_lower(); - for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { if (E->get().ptr() == p_exception) continue; @@ -1276,7 +1276,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p EditorProgress progress("import", TTR("Import Scene"), 104); progress.step(TTR("Importing Scene..."), 0); - for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) { + for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) { List<String> extensions; E->get()->get_extensions(&extensions); @@ -1368,7 +1368,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p float anim_optimizer_maxang = p_options["animation/optimizer/max_angle"]; int light_bake_mode = p_options["meshes/light_baking"]; - Map<Ref<Mesh>, List<Ref<Shape> > > collision_map; + Map<Ref<Mesh>, List<Ref<Shape>>> collision_map; scene = _fix_node(scene, scene, collision_map, LightBakeMode(light_bake_mode)); @@ -1456,9 +1456,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p } if (external_animations || external_materials || external_meshes) { - Map<Ref<Animation>, Ref<Animation> > anim_map; - Map<Ref<Material>, Ref<Material> > mat_map; - Map<Ref<ArrayMesh>, Ref<ArrayMesh> > mesh_map; + Map<Ref<Animation>, Ref<Animation>> anim_map; + Map<Ref<Material>, Ref<Material>> mat_map; + Map<Ref<ArrayMesh>, Ref<ArrayMesh>> mesh_map; bool keep_materials = bool(p_options["materials/keep_on_reimport"]); diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 20e7af15b5..6d1043eb28 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -93,7 +93,7 @@ public: class ResourceImporterScene : public ResourceImporter { GDCLASS(ResourceImporterScene, ResourceImporter); - Set<Ref<EditorSceneImporter> > importers; + Set<Ref<EditorSceneImporter>> importers; static ResourceImporterScene *singleton; @@ -125,7 +125,7 @@ class ResourceImporterScene : public ResourceImporter { public: static ResourceImporterScene *get_singleton() { return singleton; } - const Set<Ref<EditorSceneImporter> > &get_importers() const { return importers; } + const Set<Ref<EditorSceneImporter>> &get_importers() const { return importers; } void add_importer(Ref<EditorSceneImporter> p_importer) { importers.insert(p_importer); } void remove_importer(Ref<EditorSceneImporter> p_importer) { importers.erase(p_importer); } @@ -145,9 +145,9 @@ public: void _find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Transform> &meshes); - void _make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation> > &p_animations, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes); + void _make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation>> &p_animations, Map<Ref<Material>, Ref<Material>> &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh>> &p_meshes); - Node *_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape> > > &collision_map, LightBakeMode p_light_bake_mode); + Node *_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape>>> &collision_map, LightBakeMode p_light_bake_mode); void _create_clips(Node *scene, const Array &p_clips, bool p_bake_all); void _filter_anim_tracks(Ref<Animation> anim, Set<String> &keep); diff --git a/editor/import/resource_importer_texture_atlas.cpp b/editor/import/resource_importer_texture_atlas.cpp index 3172cc7279..2765bb7fae 100644 --- a/editor/import/resource_importer_texture_atlas.cpp +++ b/editor/import/resource_importer_texture_atlas.cpp @@ -192,7 +192,7 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr } } -Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant> > &p_source_file_options, const Map<String, String> &p_base_paths) { +Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) { ERR_FAIL_COND_V(p_source_file_options.size() == 0, ERR_BUG); //should never happen @@ -202,7 +202,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file pack_data_files.resize(p_source_file_options.size()); int idx = 0; - for (const Map<String, Map<StringName, Variant> >::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { + for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { PackData &pack_data = pack_data_files.write[idx]; const String &source = E->key(); @@ -251,7 +251,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file Ref<BitMap> bit_map; bit_map.instance(); bit_map->create_from_image_alpha(image); - Vector<Vector<Vector2> > polygons = bit_map->clip_opaque_to_polygons(Rect2(0, 0, image->get_width(), image->get_height())); + Vector<Vector<Vector2>> polygons = bit_map->clip_opaque_to_polygons(Rect2(0, 0, image->get_width(), image->get_height())); for (int j = 0; j < polygons.size(); j++) { @@ -323,7 +323,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file //save the images idx = 0; - for (const Map<String, Map<StringName, Variant> >::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { + for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) { PackData &pack_data = pack_data_files.write[idx]; diff --git a/editor/import/resource_importer_texture_atlas.h b/editor/import/resource_importer_texture_atlas.h index e455a157cf..a36cae5872 100644 --- a/editor/import/resource_importer_texture_atlas.h +++ b/editor/import/resource_importer_texture_atlas.h @@ -40,7 +40,7 @@ class ResourceImporterTextureAtlas : public ResourceImporter { Rect2 region; bool is_mesh; Vector<int> chart_pieces; //one for region, many for mesh - Vector<Vector<Vector2> > chart_vertices; //for mesh + Vector<Vector<Vector2>> chart_vertices; //for mesh Ref<Image> image; }; @@ -64,7 +64,7 @@ public: virtual String get_option_group_file() const; virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL); - virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant> > &p_source_file_options, const Map<String, String> &p_base_paths); + virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths); ResourceImporterTextureAtlas(); }; |