diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-10 11:29:35 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-10 11:29:35 +0300 |
commit | 6a11cd036cefd99689866ddd8f63861f9383766a (patch) | |
tree | c3ebdfc383cb77c08364c6cffab5fe6adee75a32 /source/blender/io | |
parent | aebca2bd652dd7434a3026882c0b6584422eb718 (diff) |
Cleanup: Clang tidy
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/alembic/exporter/abc_custom_props.cc | 4 | ||||
-rw-r--r-- | source/blender/io/alembic/intern/abc_customdata.cc | 2 | ||||
-rw-r--r-- | source/blender/io/wavefront_obj/importer/obj_import_mesh.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/io/alembic/exporter/abc_custom_props.cc b/source/blender/io/alembic/exporter/abc_custom_props.cc index 23a39ca2ee6..c5cc4631e18 100644 --- a/source/blender/io/alembic/exporter/abc_custom_props.cc +++ b/source/blender/io/alembic/exporter/abc_custom_props.cc @@ -150,7 +150,7 @@ void CustomPropertiesExporter::write_idparray_of_strings(const IDProperty *idp_a } /* Alembic needs a pointer to the first value of the array. */ - const std::string *array_of_strings = &strings[0]; + const std::string *array_of_strings = strings.data(); set_array_property<OStringArrayProperty, std::string>( idp_array->name, array_of_strings, strings.size()); } @@ -204,7 +204,7 @@ void CustomPropertiesExporter::write_idparray_flattened_typed(const IDProperty * } set_array_property<ABCPropertyType, BlenderValueType>( - idp_array->name, &matrix_values[0], matrix_values.size()); + idp_array->name, matrix_values.data(), matrix_values.size()); } template<typename ABCPropertyType, typename BlenderValueType> diff --git a/source/blender/io/alembic/intern/abc_customdata.cc b/source/blender/io/alembic/intern/abc_customdata.cc index 6e4ec6d23fa..2820a128072 100644 --- a/source/blender/io/alembic/intern/abc_customdata.cc +++ b/source/blender/io/alembic/intern/abc_customdata.cc @@ -257,7 +257,7 @@ void write_generated_coordinates(const OCompoundProperty &prop, CDStreamConfig & /* ORCOs are always stored in the normalized 0..1 range in Blender, but Alembic stores them * unnormalized, so we need to unnormalize (invert transform) them. */ BKE_mesh_orco_verts_transform( - mesh, reinterpret_cast<float(*)[3]>(&coords[0]), mesh->totvert, true); + mesh, reinterpret_cast<float(*)[3]>(coords.data()), mesh->totvert, true); if (!config.abc_orco.valid()) { /* Create the Alembic property and keep a reference so future frames can reuse it. */ diff --git a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc index 8d560bd2c8c..854ab96e39f 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_mesh.cc @@ -289,7 +289,7 @@ static Material *get_or_create_material(Main *bmain, /* We have not, will have to create it. Create a new default * MTLMaterial too, in case the OBJ file tries to use a material * that was not in the MTL file. */ - const MTLMaterial &mtl = *materials.lookup_or_add(name, std::make_unique<MTLMaterial>()).get(); + const MTLMaterial &mtl = *materials.lookup_or_add(name, std::make_unique<MTLMaterial>()); Material *mat = BKE_material_add(bmain, name.c_str()); ShaderNodetreeWrap mat_wrap{bmain, mtl, mat}; |