XGLLoader: fix const issue when seeting vec2.
parent
bef219a2d9
commit
dec3e2ba42
|
@ -904,12 +904,14 @@ aiVector2D XGLImporter::ReadVec2()
|
||||||
}
|
}
|
||||||
const char* s = m_reader->getNodeData();
|
const char* s = m_reader->getNodeData();
|
||||||
|
|
||||||
for(int i = 0; i < 2; ++i) {
|
ai_real v[2];
|
||||||
|
for(int i = 0; i < 2; ++i) {
|
||||||
if(!SkipSpaces(&s)) {
|
if(!SkipSpaces(&s)) {
|
||||||
LogError("unexpected EOL, failed to parse vec2");
|
LogError("unexpected EOL, failed to parse vec2");
|
||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
vec[i] = fast_atof(&s);
|
|
||||||
|
v[i] = fast_atof(&s);
|
||||||
|
|
||||||
SkipSpaces(&s);
|
SkipSpaces(&s);
|
||||||
if (i != 1 && *s != ',') {
|
if (i != 1 && *s != ',') {
|
||||||
|
@ -918,6 +920,8 @@ aiVector2D XGLImporter::ReadVec2()
|
||||||
}
|
}
|
||||||
++s;
|
++s;
|
||||||
}
|
}
|
||||||
|
vec.x = v[0];
|
||||||
|
vex.y = v[1];
|
||||||
|
|
||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue