From 44d7cb8177d732501d52fc7a2fb9b4a02565a168 Mon Sep 17 00:00:00 2001 From: escherstair Date: Thu, 29 Aug 2019 10:37:19 +0200 Subject: [PATCH] possible inefficient checking for lists emptiness --- code/X3D/X3DImporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/X3D/X3DImporter.cpp b/code/X3D/X3DImporter.cpp index b8f1c6bec..46ac2a2b3 100644 --- a/code/X3D/X3DImporter.cpp +++ b/code/X3D/X3DImporter.cpp @@ -722,7 +722,7 @@ void X3DImporter::XML_ReadNode_GetAttrVal_AsArrVec3f(const int pAttrIdx, std::ve XML_ReadNode_GetAttrVal_AsListVec3f(pAttrIdx, tlist);// read as list // and copy to array - if(tlist.size() > 0) + if(!tlist.empty()) { pValue.reserve(tlist.size()); for ( std::list::iterator it = tlist.begin(); it != tlist.end(); ++it ) @@ -1699,7 +1699,7 @@ void X3DImporter::InternReadFile(const std::string& pFile, aiScene* pScene, IOSy // create nodes tree Postprocess_BuildNode(*NodeElement_Cur, *pScene->mRootNode, mesh_list, mat_list, light_list); // copy needed data to scene - if(mesh_list.size() > 0) + if(!mesh_list.empty()) { std::list::const_iterator it = mesh_list.begin();