Browse Source

- BUGFIX: Fix compiler warnings.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@492 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
kimmi 16 years ago
parent
commit
a61411d4b4
1 changed files with 7 additions and 4 deletions
  1. 7 4
      code/MD5Parser.cpp

+ 7 - 4
code/MD5Parser.cpp

@@ -56,7 +56,7 @@ using namespace Assimp::MD5;
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Parse the segment structure fo a MD5 file
 // Parse the segment structure fo a MD5 file
-MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize)
+MD5Parser::MD5Parser(char* _buffer, unsigned int /*_fileSize*/ )
 {
 {
 	ai_assert(NULL != _buffer && 0 != _fileSize);
 	ai_assert(NULL != _buffer && 0 != _fileSize);
 
 
@@ -70,7 +70,8 @@ MD5Parser::MD5Parser(char* _buffer, unsigned int _fileSize)
 	ParseHeader();
 	ParseHeader();
 
 
 	// and read all sections until we're finished
 	// and read all sections until we're finished
-	while (1)	{
+	bool running = true;
+	while (running)	{
 		mSections.push_back(Section());
 		mSections.push_back(Section());
 		Section& sec = mSections.back();
 		Section& sec = mSections.back();
 		if(!ParseSection(sec))	{
 		if(!ParseSection(sec))	{
@@ -140,11 +141,13 @@ bool MD5Parser::ParseSection(Section& out)
 	out.mName = std::string(sz,(uintptr_t)(buffer-sz));
 	out.mName = std::string(sz,(uintptr_t)(buffer-sz));
 	SkipSpaces();
 	SkipSpaces();
 
 
-	while (1)	{
+	bool running = true;
+	while (running)	{
 		if ('{' == *buffer)	{
 		if ('{' == *buffer)	{
 			// it is a normal section so read all lines
 			// it is a normal section so read all lines
 			buffer++;
 			buffer++;
-			while (true)
+			bool run = true;
+			while (run)
 			{
 			{
 				if (!SkipSpacesAndLineEnd()) {
 				if (!SkipSpacesAndLineEnd()) {
 					return false; // seems this was the last section
 					return false; // seems this was the last section