COB: code cleanup.
parent
b3a3558da3
commit
0cee21ce3c
|
@ -148,13 +148,17 @@ void COBImporter::InternReadFile( const std::string& pFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultLogger::get()->info("File format tag: "+std::string(head+9,6));
|
DefaultLogger::get()->info("File format tag: "+std::string(head+9,6));
|
||||||
void (COBImporter::* load)(Scene&,StreamReaderLE*)= head[15]=='A'?&COBImporter::ReadAsciiFile:&COBImporter::ReadBinaryFile;
|
|
||||||
if (head[16]!='L') {
|
if (head[16]!='L') {
|
||||||
ThrowException("File is big-endian, which is not supported");
|
ThrowException("File is big-endian, which is not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
// load data into intermediate structures
|
// load data into intermediate structures
|
||||||
(this->*load)(scene,stream.get());
|
if (head[15]=='A') {
|
||||||
|
ReadAsciiFile(scene, stream.get());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ReadBinaryFile(scene, stream.get());
|
||||||
|
}
|
||||||
if(scene.nodes.empty()) {
|
if(scene.nodes.empty()) {
|
||||||
ThrowException("No nodes loaded");
|
ThrowException("No nodes loaded");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue