Fix parsing of comments at the end of lines for tokens with variable number of elements. (#5890) (#5891)
* Fix parsing of comments at the end of lines for tokens with variable number of elements. (#5890) * Fixed Quality Gate issues. Reduced nesting of the break statements. --------- Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2b773f0f5a
commit
2090508c34
@@ -300,7 +300,7 @@ size_t ObjFileParser::getNumComponentsInDataDefinition() {
|
||||
} else if (IsLineEnd(*tmp)) {
|
||||
end_of_definition = true;
|
||||
}
|
||||
if (!SkipSpaces(&tmp, mEnd)) {
|
||||
if (!SkipSpaces(&tmp, mEnd) || *tmp == '#') {
|
||||
break;
|
||||
}
|
||||
const bool isNum(IsNumeric(*tmp) || isNanOrInf(tmp));
|
||||
@@ -308,11 +308,11 @@ size_t ObjFileParser::getNumComponentsInDataDefinition() {
|
||||
if (isNum) {
|
||||
++numComponents;
|
||||
}
|
||||
if (!SkipSpaces(&tmp, mEnd)) {
|
||||
if (!SkipSpaces(&tmp, mEnd) || *tmp == '#') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return numComponents;
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ void ObjFileParser::getFace(aiPrimitiveType type) {
|
||||
while (m_DataIt < m_DataItEnd) {
|
||||
int iStep = 1;
|
||||
|
||||
if (IsLineEnd(*m_DataIt)) {
|
||||
if (IsLineEnd(*m_DataIt) || *m_DataIt == '#') {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user