diff --git a/code/SMDLoader.cpp b/code/SMDLoader.cpp index 3abe862fe..2bc73abec 100644 --- a/code/SMDLoader.cpp +++ b/code/SMDLoader.cpp @@ -684,7 +684,7 @@ void SMDImporter::ParseFile() const char* szCurrent = mBuffer; // read line per line ... - while (true) + for ( ;; ) { if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break; @@ -750,7 +750,7 @@ unsigned int SMDImporter::GetTextureIndex(const std::string& filename) void SMDImporter::ParseNodesSection(const char* szCurrent, const char** szCurrentOut) { - while (true) + for ( ;; ) { // "end\n" - Ends the nodes section if (0 == ASSIMP_strincmp(szCurrent,"end",3) && @@ -772,7 +772,7 @@ void SMDImporter::ParseTrianglesSection(const char* szCurrent, { // Parse a triangle, parse another triangle, parse the next triangle ... // and so on until we reach a token that looks quite similar to "end" - while (true) + for ( ;; ) { if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break; @@ -790,7 +790,7 @@ void SMDImporter::ParseVASection(const char* szCurrent, const char** szCurrentOut) { unsigned int iCurIndex = 0; - while (true) + for ( ;; ) { if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break; @@ -833,7 +833,7 @@ void SMDImporter::ParseSkeletonSection(const char* szCurrent, const char** szCurrentOut) { int iTime = 0; - while (true) + for ( ;; ) { if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break; @@ -887,7 +887,7 @@ void SMDImporter::ParseNodeInfo(const char* szCurrent, else ++szCurrent; const char* szEnd = szCurrent; - while (true) + for ( ;; ) { if (bQuota && '\"' == *szEnd) { diff --git a/code/STLLoader.cpp b/code/STLLoader.cpp index e96d38397..2c43b8258 100644 --- a/code/STLLoader.cpp +++ b/code/STLLoader.cpp @@ -203,7 +203,7 @@ void STLImporter::LoadASCIIFile() pMesh->mNormals = new aiVector3D[pMesh->mNumVertices]; unsigned int curFace = 0, curVertex = 3; - while (true) + for ( ;; ) { // go to the next token if(!SkipSpacesAndLineEnd(&sz)) diff --git a/code/StringComparison.h b/code/StringComparison.h index ca6f3e87f..0743c41be 100644 --- a/code/StringComparison.h +++ b/code/StringComparison.h @@ -87,7 +87,7 @@ inline unsigned int ASSIMP_itoa10( char* out, unsigned int max, int32_t number) // print all future zeroes from now mustPrint = true; - *out++ = '0'+digit; + *out++ = '0'+static_cast(digit); ++written; number -= digit*cur;