1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

CppCheck fixes

This commit is contained in:
Broxzier
2016-11-30 23:32:47 +01:00
parent c44c93a627
commit 6c29bdbf21
109 changed files with 825 additions and 1120 deletions

View File

@@ -51,7 +51,7 @@ public:
bool WasWarning() const { return _wasWarning; }
bool WasError() const { return _wasError; }
ReadObjectContext(const utf8 * objectFileName)
explicit ReadObjectContext(const utf8 * objectFileName)
{
_objectName = String::Duplicate(objectFileName);
}
@@ -91,12 +91,12 @@ namespace ObjectFactory
{
object->ReadLegacy(context, stream);
}
catch (IOException ex)
catch (const IOException &)
{
// TODO check that ex is really EOF and not some other error
context->LogError(OBJECT_ERROR_UNEXPECTED_EOF, "Unexpectedly reached end of file.");
}
catch (Exception ex)
catch (const Exception &)
{
context->LogError(OBJECT_ERROR_UNKNOWN, nullptr);
}