diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc')
-rw-r--r-- | source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc index f2547e6fc14..95be927589e 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc @@ -503,7 +503,7 @@ static const char *tex_map_type_to_string[] = { "map_d", "map_Bump", }; -BLI_STATIC_ASSERT(ARRAY_SIZE(tex_map_type_to_string) == (int)MTLTexMapType::Count, +BLI_STATIC_ASSERT(ARRAY_SIZE(tex_map_type_to_string) == int(MTLTexMapType::Count), "array size mismatch"); /** @@ -641,7 +641,7 @@ void MTLWriter::write_texture_map(const MTLMaterial &mtl_material, /* Always emit forward slashes for cross-platform compatibility. */ std::replace(path.begin(), path.end(), '\\', '/'); - fmt_handler_.write_mtl_map(tex_map_type_to_string[(int)texture_key], options, path); + fmt_handler_.write_mtl_map(tex_map_type_to_string[int(texture_key)], options, path); } static bool is_pbr_map(MTLTexMapType type) @@ -677,7 +677,7 @@ void MTLWriter::write_materials(const char *blen_filepath, fmt_handler_.write_string(""); fmt_handler_.write_mtl_newmtl(mtlmat.name); write_bsdf_properties(mtlmat, write_pbr); - for (int key = 0; key < (int)MTLTexMapType::Count; key++) { + for (int key = 0; key < int(MTLTexMapType::Count); key++) { const MTLTexMap &tex = mtlmat.texture_maps[key]; if (!tex.is_valid()) { continue; |