fix inefficient checking for 'url' emptiness

pull/2628/head
escherstair 2019-08-29 08:34:18 +02:00 committed by GitHub
parent 60f2535dcd
commit 43865e6bc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ void X3DImporter::ParseNode_Texturing_ImageTexture()
((CX3DImporter_NodeElement_ImageTexture*)ne)->RepeatS = repeatS;
((CX3DImporter_NodeElement_ImageTexture*)ne)->RepeatT = repeatT;
// Attribute "url" can contain list of strings. But we need only one - first.
if(url.size() > 0)
if(!url.empty())
((CX3DImporter_NodeElement_ImageTexture*)ne)->URL = url.front();
else
((CX3DImporter_NodeElement_ImageTexture*)ne)->URL = "";