Fix clang builds

This commit is contained in:
Ted John 2018-05-10 18:13:41 +01:00
parent 428dd05dcf
commit f212894eb0
2 changed files with 3 additions and 3 deletions

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);
}
}
}

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))