From 74aa2b69831b28af18ff7087152bf979ca025e89 Mon Sep 17 00:00:00 2001 From: Jyrki Vesterinen Date: Sat, 18 Feb 2017 20:21:28 +0200 Subject: [PATCH] Fix build with Visual Studio I also fixed a compiler warning. --- src/image_modifications.cpp | 2 +- src/image_modifications.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/image_modifications.cpp b/src/image_modifications.cpp index 28cfb73d9891..93e8322558e0 100644 --- a/src/image_modifications.cpp +++ b/src/image_modifications.cpp @@ -520,7 +520,7 @@ std::pair scale_into_modification::calculate_size(const surface& src) c long double ratio = std::min(w / old_w, h / old_h); - return {old_w * ratio, old_h * ratio}; + return {static_cast(old_w * ratio), static_cast(old_h * ratio)}; } surface xbrz_modification::operator()(const surface& src) const diff --git a/src/image_modifications.hpp b/src/image_modifications.hpp index 37601d0e3555..58a2d9dd1068 100644 --- a/src/image_modifications.hpp +++ b/src/image_modifications.hpp @@ -51,7 +51,7 @@ class modification_queue private: /// Map from a mod's priority() to the mods having that priority. - typedef std::map>, std::greater> map_type; + typedef std::map>, std::greater> map_type; /// Map from a mod's priority() to the mods having that priority. map_type priorities_; };