From 44120b2e7ec76e84e7aa746f39890e5830159506 Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 31 Jan 2017 20:27:53 +0000 Subject: [PATCH] Fix build issues --- src/openrct2/rct12/SawyerEncoding.cpp | 2 +- src/openrct2/rct2/S6Importer.cpp | 11 ++++++++--- src/openrct2/title/TitleSequence.cpp | 2 +- src/openrct2/title/TitleSequencePlayer.cpp | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/openrct2/rct12/SawyerEncoding.cpp b/src/openrct2/rct12/SawyerEncoding.cpp index fa0fa45141..956ff32f17 100644 --- a/src/openrct2/rct12/SawyerEncoding.cpp +++ b/src/openrct2/rct12/SawyerEncoding.cpp @@ -114,7 +114,7 @@ namespace SawyerEncoding do { uint8 buffer[4096]; - uint64 bufferSize = Math::Min(dataSize, sizeof(buffer)); + uint64 bufferSize = Math::Min(dataSize, sizeof(buffer)); stream->Read(buffer, bufferSize); for (uint64 i = 0; i < bufferSize; i++) diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 8eca777a28..6ba9e2ce2d 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -62,10 +62,15 @@ class S6Importer final : public IParkImporter { private: const utf8 * _s6Path = nullptr; - rct_s6_data _s6 = { 0 }; + rct_s6_data _s6; uint8 _gameVersion = 0; public: + S6Importer() + { + Memory::Set(&_s6, 0, sizeof(_s6)); + } + void Load(const utf8 * path) override { const utf8 * extension = Path::GetExtension(path); @@ -97,7 +102,7 @@ public: _s6Path = path; } - void LoadFromStream(IStream * stream, bool isScenario) + void LoadFromStream(IStream * stream, bool isScenario) override { if (!gConfigGeneral.allow_loading_with_incorrect_checksum && !SawyerEncoding::ValidateChecksum(stream)) { @@ -159,7 +164,7 @@ public: return false; } - void Import() + void Import() override { Initialise(); diff --git a/src/openrct2/title/TitleSequence.cpp b/src/openrct2/title/TitleSequence.cpp index 29107f7643..2181254a74 100644 --- a/src/openrct2/title/TitleSequence.cpp +++ b/src/openrct2/title/TitleSequence.cpp @@ -165,7 +165,7 @@ extern "C" if (handle != nullptr) { Memory::Free(handle->HintPath); - delete handle->Stream; + delete ((IStream *)handle->Stream); } } diff --git a/src/openrct2/title/TitleSequencePlayer.cpp b/src/openrct2/title/TitleSequencePlayer.cpp index 69d5569a1a..c113fe55ce 100644 --- a/src/openrct2/title/TitleSequencePlayer.cpp +++ b/src/openrct2/title/TitleSequencePlayer.cpp @@ -375,7 +375,7 @@ private: */ bool LoadParkFromStream(IStream * stream, const std::string &hintPath) { - log_verbose("TitleSequencePlayer::LoadParkFromStream(%s)", hintPath); + log_verbose("TitleSequencePlayer::LoadParkFromStream(%s)", hintPath.c_str()); bool success = false; try {