Commit 36ad2bb9 authored by hybrid's avatar hybrid

Merge from 1.7 branch. revisions 4319-4343. Compiler problem and STL loader fixes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4344 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 8537ca8e
...@@ -45,7 +45,8 @@ namespace scene ...@@ -45,7 +45,8 @@ namespace scene
virtual void push_back(const u32 &element) virtual void push_back(const u32 &element)
{ {
Indices.push_back((T&)element); // push const ref due to compiler problem with gcc 4.6, big endian
Indices.push_back((const T&)element);
} }
virtual u32 operator [](u32 index) const virtual u32 operator [](u32 index) const
......
...@@ -53,8 +53,8 @@ IAnimatedMesh* CSTLMeshFileLoader::createMesh(io::IReadFile* file) ...@@ -53,8 +53,8 @@ IAnimatedMesh* CSTLMeshFileLoader::createMesh(io::IReadFile* file)
c8 buffer[WORD_BUFFER_LENGTH]; c8 buffer[WORD_BUFFER_LENGTH];
bool binary = false; bool binary = false;
file->read(buffer, 5); core::stringc token;
if (strncmp("solid", buffer, 5)) if (getNextToken(file, token) != "solid")
binary = true; binary = true;
// read/skip header // read/skip header
u32 binFaceCount = 0; u32 binFaceCount = 0;
...@@ -70,7 +70,6 @@ IAnimatedMesh* CSTLMeshFileLoader::createMesh(io::IReadFile* file) ...@@ -70,7 +70,6 @@ IAnimatedMesh* CSTLMeshFileLoader::createMesh(io::IReadFile* file)
goNextLine(file); goNextLine(file);
u16 attrib=0; u16 attrib=0;
core::stringc token;
token.reserve(32); token.reserve(32);
while (file->getPos() < filesize) while (file->getPos() < filesize)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment