BlenderDNA.h:
* Fix rethrow that would crash the program. * QUESTION: am I throwing the right exception here. COBLoader: * catch exception by const ref * fix equality checks using strncmp taht weren't actually checking equality FBXMaterial: Catch exception by const ref (+ Debug log that it's done so) FBXConverter: Rename local variables to avoid shadowing parameter ImageExtractor: Remove duplicated/unreachable code FBXConverter: Another shadowed variable fix MD5Loader: 2 shadowed variables IRRLoader: shadowed parameter StepFileReader.cpp: Shadowed parameter IRRLoader: remove empty else statement STLExporter: Throw error instead of silently ignoring unimplemented option Misc empty blocks removed or debug logging added
This commit is contained in:
@@ -144,7 +144,7 @@ void COBImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
|
||||
// check header
|
||||
char head[32];
|
||||
stream->CopyAndAdvance(head,32);
|
||||
if (strncmp(head,"Caligari ",9)) {
|
||||
if (strncmp(head,"Caligari ",9) != 0) {
|
||||
ThrowException("Could not found magic id: `Caligari`");
|
||||
}
|
||||
|
||||
@@ -656,14 +656,14 @@ void COBImporter::ReadLght_Ascii(Scene& out, LineSplitter& splitter, const Chunk
|
||||
ReadFloat3Tuple_Ascii(msh.color ,&rgb);
|
||||
|
||||
SkipSpaces(&rgb);
|
||||
if (strncmp(rgb,"cone angle",10)) {
|
||||
if (strncmp(rgb,"cone angle",10) != 0) {
|
||||
ASSIMP_LOG_WARN_F( "Expected `cone angle` entity in `color` line in `Lght` chunk ", nfo.id );
|
||||
}
|
||||
SkipSpaces(rgb+10,&rgb);
|
||||
msh.angle = fast_atof(&rgb);
|
||||
|
||||
SkipSpaces(&rgb);
|
||||
if (strncmp(rgb,"inner angle",11)) {
|
||||
if (strncmp(rgb,"inner angle",11) != 0) {
|
||||
ASSIMP_LOG_WARN_F( "Expected `inner angle` entity in `color` line in `Lght` chunk ", nfo.id);
|
||||
}
|
||||
SkipSpaces(rgb+11,&rgb);
|
||||
@@ -903,7 +903,7 @@ public:
|
||||
if(nfo.size != static_cast<unsigned int>(-1)) {
|
||||
try {
|
||||
reader.IncPtr( static_cast< int >( nfo.size ) - reader.GetCurrentPos() + cur );
|
||||
} catch ( DeadlyImportError e ) {
|
||||
} catch (const DeadlyImportError& e ) {
|
||||
// out of limit so correct the value
|
||||
reader.IncPtr( reader.GetReadLimit() );
|
||||
}
|
||||
@@ -1214,7 +1214,7 @@ void COBImporter::ReadGrou_Binary(COB::Scene& out, StreamReaderLE& reader, const
|
||||
|
||||
const chunk_guard cn(nfo,reader);
|
||||
|
||||
out.nodes.push_back(std::shared_ptr<Group>(new Group()));
|
||||
out.nodes.push_back(std::make_shared<Group>());
|
||||
Group& msh = (Group&)(*out.nodes.back().get());
|
||||
msh = nfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user