CppCheck fixes

This commit is contained in:
Broxzier committed 2016-12-24 13:10:03 +01:00
1 parent c44c93a627
commit 6c29bdbf21
109 files changed
+825 -1120

No files matched your search

+9 -9
View File
@@ -215,7 +215,7 @@ public:
SaveObject(path, objectEntry, data, dataSize);
ScanObject(path);
}
catch (Exception ex)
catch (const Exception &)
{
Console::Error::WriteLine("Failed saving object: [%s] to '%s'.", objectName, path);
}
@@ -324,7 +324,7 @@ private:
Console::WriteLine("Object repository is out of date.");
return false;
}
catch (IOException ex)
catch (const IOException &)
{
return false;
}
@@ -354,7 +354,7 @@ private:
WriteItem(&fs, _items[i]);
}
}
catch (IOException ex)
catch (const IOException &)
{
log_error("Unable to write object repository index to '%s'.", path.c_str());
}
@@ -516,7 +516,7 @@ private:
Memory::Free(newData);
Memory::Free(extraBytes);
}
catch (Exception ex)
catch (const Exception &)
{
Memory::Free(newData);
Memory::Free(extraBytes);
@@ -543,7 +543,7 @@ private:
Memory::Free(encodedDataBuffer);
}
catch (Exception ex)
catch (const Exception &)
{
Memory::Free(encodedDataBuffer);
throw;
@@ -836,7 +836,7 @@ extern "C"
{
if (object != nullptr)
{
Object * baseObject = (Object *)object;
Object * baseObject = static_cast<Object *>(object);
baseObject->Unload();
delete baseObject;
}
@@ -844,7 +844,7 @@ extern "C"
const utf8 * object_get_description(const void * object)
{
const Object * baseObject = (const Object *)object;
const Object * baseObject = static_cast<const Object *>(object);
switch (baseObject->GetObjectType()) {
case OBJECT_TYPE_RIDE:
{
@@ -863,7 +863,7 @@ extern "C"
const utf8 * object_get_capacity(const void * object)
{
const Object * baseObject = (const Object *)object;
const Object * baseObject = static_cast<const Object *>(object);
switch (baseObject->GetObjectType()) {
case OBJECT_TYPE_RIDE:
{
@@ -877,7 +877,7 @@ extern "C"
void object_draw_preview(const void * object, rct_drawpixelinfo * dpi, sint32 width, sint32 height)
{
const Object * baseObject = (const Object *)object;
const Object * baseObject = static_cast<const Object *>(object);
baseObject->DrawPreview(dpi, width, height);
}