From b49a4e133884ba2ed73cd16cd07250b4d875dd70 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Tue, 14 Nov 2017 18:48:07 +0200 Subject: [PATCH] PLY: Remove dead assignment and reduce scope of a variable --- code/PlyParser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/PlyParser.cpp b/code/PlyParser.cpp index 65de665ab..6321821d2 100644 --- a/code/PlyParser.cpp +++ b/code/PlyParser.cpp @@ -671,7 +671,6 @@ bool PLY::ElementInstanceList::ParseInstanceList( PLYImporter* loader) { ai_assert(NULL != pcElement); - const char* pCur = (const char*)&buffer[0]; // parse all elements if (EEST_INVALID == pcElement->eSemantic || pcElement->alProperties.empty()) @@ -683,11 +682,11 @@ bool PLY::ElementInstanceList::ParseInstanceList( PLY::DOM::SkipComments(buffer); PLY::DOM::SkipLine(buffer); streamBuffer.getNextLine(buffer); - pCur = (buffer.empty()) ? NULL : (const char*)&buffer[0]; } } else { + const char* pCur = (const char*)&buffer[0]; // be sure to have enough storage for (unsigned int i = 0; i < pcElement->NumOccur; ++i) {