Commit 4649b007 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed various cppcheck warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16348 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 751b2024
......@@ -168,32 +168,28 @@ void INIPlugin::saveIniFile(INIFile& _ini, BaseObjectData* _object) {
void INIPlugin::loadIniFile( INIFile& _ini, int _id ) {
BaseObjectData* baseObject;
if ( !PluginFunctions::getObject(_id,baseObject) ) {
emit log(LOGERR,tr("Cannot find object for id ") + QString::number(_id) + tr(" in saveFile") );
return;
}
PolyMeshObject* polyObject(0);
TriMeshObject* triObject(0);
LightObject* lightObject(0);
// Load all data from baseobjectdata part
parseIniFile(_ini,baseObject);
if(baseObject->dataType() == DATA_POLY_MESH) {
polyObject = PluginFunctions::polyMeshObject(baseObject);
parseIniFileT(_ini, polyObject);
} else if ( baseObject->dataType() == DATA_TRIANGLE_MESH) {
triObject = PluginFunctions::triMeshObject(baseObject);
parseIniFileT(_ini, triObject);
} else if ( baseObject->dataType() == DATA_LIGHT ) {
lightObject = PluginFunctions::lightObject(baseObject);
parseIniFileT(_ini, lightObject);
} else {
// Unhandled data type
emit log(LOGERR, tr("The specified data type is not supported, yet. Aborting!"));
}
BaseObjectData* baseObject;
if (!PluginFunctions::getObject(_id, baseObject)) {
emit log(LOGERR, tr("Cannot find object for id ") + QString::number(_id) + tr(" in saveFile"));
return;
}
// Load all data from baseobjectdata part
parseIniFile(_ini, baseObject);
if (baseObject->dataType() == DATA_POLY_MESH) {
PolyMeshObject* polyObject = PluginFunctions::polyMeshObject(baseObject);
parseIniFileT(_ini, polyObject);
} else if (baseObject->dataType() == DATA_TRIANGLE_MESH) {
TriMeshObject* triObject = PluginFunctions::triMeshObject(baseObject);
parseIniFileT(_ini, triObject);
} else if (baseObject->dataType() == DATA_LIGHT) {
LightObject* lightObject = PluginFunctions::lightObject(baseObject);
parseIniFileT(_ini, lightObject);
} else {
// Unhandled data type
emit log(LOGERR, tr("The specified data type is not supported, yet. Aborting!"));
}
}
void INIPlugin::saveIniFile( INIFile& _ini, int _id) {
......
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