Fix clang builds

This commit is contained in:
Ted John committed 2018-05-13 01:11:56 +01:00
1 parent 428dd05dcf
commit f212894eb0
2 files changed
+3 -3

No files matched your search

+1 -2
View File
@@ -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<IMAGE_FORMAT, ImageReaderFunc> _readerImplementations;
@@ -366,7 +365,7 @@ namespace Imaging
break;
}
default:
throw std::runtime_error("Unknown image format.");
throw std::runtime_error(EXCEPTION_IMAGE_FORMAT_UNKNOWN);
}
}
}
+2 -1
View File
@@ -16,6 +16,7 @@
#include <cstring>
#include <stdexcept>
#include <string>
#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))