Sfoglia il codice sorgente

SIBImporter: Properly fix C++11 issues for Clang

C-style cast has a higher precedence than & -operator so this was getting
parsed differently than Kim assumed. Thou shalt not use C-style casts.
Turo Lamminen 9 anni fa
parent
commit
0e06404ec1
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      code/SIBImporter.cpp

+ 4 - 4
code/SIBImporter.cpp

@@ -164,10 +164,10 @@ static aiColor3D ReadColor(StreamReaderLE* stream)
 static void UnknownChunk(StreamReaderLE* stream, const SIBChunk& chunk)
 {
     char temp[5] = { 
-        ( char ) ( chunk.Tag>>24 ) & 0xff, 
-        ( char ) ( chunk.Tag>>16 ) & 0xff, 
-        ( char ) ( chunk.Tag>>8 ) & 0xff, 
-        ( char ) chunk.Tag & 0xff, '\0'
+        static_cast<char>(( chunk.Tag>>24 ) & 0xff),
+        static_cast<char>(( chunk.Tag>>16 ) & 0xff),
+        static_cast<char>(( chunk.Tag>>8 ) & 0xff),
+        static_cast<char>(chunk.Tag & 0xff), '\0'
     };
     
     DefaultLogger::get()->warn((Formatter::format(), "SIB: Skipping unknown '",temp,"' chunk."));