|
@@ -1000,6 +1000,22 @@ void XFileParser::CheckForSeparator()
|
|
ThrowException( "Separator character (';' or ',') expected.");
|
|
ThrowException( "Separator character (';' or ',') expected.");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ------------------------------------------------------------------------------------------------
|
|
|
|
+// tests and possibly consumes a separator char, but does nothing if there was no separator
|
|
|
|
+void XFileParser::TestForSeparator()
|
|
|
|
+{
|
|
|
|
+ if( mIsBinaryFormat)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ FindNextNoneWhiteSpace();
|
|
|
|
+ if( P >= End)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ // test and skip
|
|
|
|
+ if( *P == ';' || *P == ',')
|
|
|
|
+ P++;
|
|
|
|
+}
|
|
|
|
+
|
|
// ------------------------------------------------------------------------------------------------
|
|
// ------------------------------------------------------------------------------------------------
|
|
void XFileParser::readHeadOfDataObject( std::string* poName)
|
|
void XFileParser::readHeadOfDataObject( std::string* poName)
|
|
{
|
|
{
|
|
@@ -1332,7 +1348,7 @@ aiVector2D XFileParser::ReadVector2()
|
|
aiVector2D vector;
|
|
aiVector2D vector;
|
|
vector.x = ReadFloat();
|
|
vector.x = ReadFloat();
|
|
vector.y = ReadFloat();
|
|
vector.y = ReadFloat();
|
|
- CheckForSeparator();
|
|
|
|
|
|
+ TestForSeparator();
|
|
|
|
|
|
return vector;
|
|
return vector;
|
|
}
|
|
}
|
|
@@ -1344,7 +1360,7 @@ aiVector3D XFileParser::ReadVector3()
|
|
vector.x = ReadFloat();
|
|
vector.x = ReadFloat();
|
|
vector.y = ReadFloat();
|
|
vector.y = ReadFloat();
|
|
vector.z = ReadFloat();
|
|
vector.z = ReadFloat();
|
|
- CheckForSeparator();
|
|
|
|
|
|
+ TestForSeparator();
|
|
|
|
|
|
return vector;
|
|
return vector;
|
|
}
|
|
}
|
|
@@ -1357,7 +1373,7 @@ aiColor4D XFileParser::ReadRGBA()
|
|
color.g = ReadFloat();
|
|
color.g = ReadFloat();
|
|
color.b = ReadFloat();
|
|
color.b = ReadFloat();
|
|
color.a = ReadFloat();
|
|
color.a = ReadFloat();
|
|
- CheckForSeparator();
|
|
|
|
|
|
+ TestForSeparator();
|
|
|
|
|
|
return color;
|
|
return color;
|
|
}
|
|
}
|
|
@@ -1369,7 +1385,7 @@ aiColor3D XFileParser::ReadRGB()
|
|
color.r = ReadFloat();
|
|
color.r = ReadFloat();
|
|
color.g = ReadFloat();
|
|
color.g = ReadFloat();
|
|
color.b = ReadFloat();
|
|
color.b = ReadFloat();
|
|
- CheckForSeparator();
|
|
|
|
|
|
+ TestForSeparator();
|
|
|
|
|
|
return color;
|
|
return color;
|
|
}
|
|
}
|