From 0cee21ce3c049c48658c914a103f6efcca215006 Mon Sep 17 00:00:00 2001 From: Alexander Gessler Date: Mon, 13 Apr 2015 21:52:09 +0200 Subject: [PATCH] COB: code cleanup. --- code/COBLoader.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/COBLoader.cpp b/code/COBLoader.cpp index ce9ceeb7e..0b90067c5 100644 --- a/code/COBLoader.cpp +++ b/code/COBLoader.cpp @@ -148,13 +148,17 @@ void COBImporter::InternReadFile( const std::string& pFile, } 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') { ThrowException("File is big-endian, which is not supported"); } // 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()) { ThrowException("No nodes loaded"); }