You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
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`.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user