mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
According to the jenkins build report, Windows/MSVC has a different definition of std C++ than ISO does.
Fine. Make our own cross-platform isdigit.
This commit is contained in:
parent
fcb8c77bc3
commit
7245ca4ff3
1 changed files with 7 additions and 1 deletions
|
@ -176,6 +176,12 @@ void OBJFace::addFrom(const OBJFace* face, int index) { // add using data from f
|
|||
}
|
||||
}
|
||||
|
||||
// Hmmm. Build report for Windows (which I don't have) reports that MSVC thinks isdigit isn't part of std lib.
|
||||
// Fine. I'll roll my own.
|
||||
bool fakeIsDigit(int character) {
|
||||
return ('0' <= character) && (character <= '9');
|
||||
}
|
||||
|
||||
bool OBJReader::parseOBJGroup(OBJTokenizer& tokenizer, const QVariantHash& mapping, FBXGeometry& geometry, float& scaleGuess) {
|
||||
FaceGroup faces;
|
||||
FBXMesh& mesh = geometry.meshes[0];
|
||||
|
@ -242,7 +248,7 @@ bool OBJReader::parseOBJGroup(OBJTokenizer& tokenizer, const QVariantHash& mappi
|
|||
// vertex-index/texture-index
|
||||
// vertex-index/texture-index/surface-normal-index
|
||||
QByteArray token = tokenizer.getDatum();
|
||||
if (!std::isdigit(token[0])) { // Tokenizer treats line endings as whitespace. Non-digit indicates done;
|
||||
if (!fakeIsDigit(token[0])) { // Tokenizer treats line endings as whitespace. Non-digit indicates done;
|
||||
tokenizer.pushBackToken(OBJTokenizer::DATUM_TOKEN);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue