diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-03 15:59:27 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-03 15:59:27 +0300 |
commit | 2633683b52054d15006aea1314f62f73a8505b42 (patch) | |
tree | a97b2916170b53f04fc9a898f4eedb527f14f84e /source/blender/io/collada/MeshImporter.cpp | |
parent | 93da09d717ff4502975c506c574faf0c07f010b4 (diff) |
Clang-tidy: enable readability-container-size-empty warning
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8197
Diffstat (limited to 'source/blender/io/collada/MeshImporter.cpp')
-rw-r--r-- | source/blender/io/collada/MeshImporter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp index 6683f07bf65..495af60488b 100644 --- a/source/blender/io/collada/MeshImporter.cpp +++ b/source/blender/io/collada/MeshImporter.cpp @@ -50,7 +50,7 @@ // get node name, or fall back to original id if not present (name is optional) template<class T> static const std::string bc_get_dae_name(T *node) { - return node->getName().size() ? node->getName() : node->getOriginalId(); + return node->getName().empty() ? node->getOriginalId() : node->getName(); } static const char *bc_primTypeToStr(COLLADAFW::MeshPrimitive::PrimitiveType type) @@ -1126,7 +1126,7 @@ Object *MeshImporter::create_mesh_object( } // name Object - const std::string &id = node->getName().size() ? node->getName() : node->getOriginalId(); + const std::string &id = node->getName().empty() ? node->getOriginalId() : node->getName(); const char *name = (id.length()) ? id.c_str() : NULL; // add object @@ -1185,8 +1185,8 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry *geom) return true; } - const std::string &str_geom_id = mesh->getName().size() ? mesh->getName() : - mesh->getOriginalId(); + const std::string &str_geom_id = mesh->getName().empty() ? mesh->getOriginalId() : + mesh->getName(); Mesh *me = BKE_mesh_add(m_bmain, (char *)str_geom_id.c_str()); id_us_min(&me->id); // is already 1 here, but will be set later in BKE_mesh_assign_object |