From f212894eb04c82e3dbc0f12e516e12fb0ebe516d Mon Sep 17 00:00:00 2001 From: Ted John Date: Thu, 10 May 2018 18:13:41 +0100 Subject: [PATCH] Fix clang builds --- src/openrct2/core/Imaging.cpp | 3 +-- src/openrct2/drawing/ImageImporter.cpp | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrct2/core/Imaging.cpp b/src/openrct2/core/Imaging.cpp index 3ccfce78f6..37e5e25173 100644 --- a/src/openrct2/core/Imaging.cpp +++ b/src/openrct2/core/Imaging.cpp @@ -53,7 +53,6 @@ public: namespace Imaging { - constexpr auto EXCEPTION_IMAGE_FORMAT_UNSUPPORTED = "Unsupported image format."; constexpr auto EXCEPTION_IMAGE_FORMAT_UNKNOWN = "Unknown image format."; static std::unordered_map _readerImplementations; @@ -366,7 +365,7 @@ namespace Imaging break; } default: - throw std::runtime_error("Unknown image format."); + throw std::runtime_error(EXCEPTION_IMAGE_FORMAT_UNKNOWN); } } } diff --git a/src/openrct2/drawing/ImageImporter.cpp b/src/openrct2/drawing/ImageImporter.cpp index 668907eb86..07f5747a0c 100644 --- a/src/openrct2/drawing/ImageImporter.cpp +++ b/src/openrct2/drawing/ImageImporter.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "../core/Imaging.h" #include "ImageImporter.h" @@ -44,7 +45,7 @@ ImportResult ImageImporter::Import( if ((flags & IMPORT_FLAGS::KEEP_PALETTE) && image.Depth != 8) { - throw std::invalid_argument("Image is not palletted, it has bit depth of " + image.Depth); + throw std::invalid_argument("Image is not palletted, it has bit depth of " + std::to_string(image.Depth)); } if (!(flags & IMPORT_FLAGS::RLE))