Fix build with Visual Studio

I also fixed a compiler warning.
This commit is contained in:
Jyrki Vesterinen 2017-02-18 20:21:28 +02:00
parent 0e1d6df91a
commit 74aa2b6983
2 changed files with 2 additions and 2 deletions

View File

@ -520,7 +520,7 @@ std::pair<int,int> 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<int>(old_w * ratio), static_cast<int>(old_h * ratio)};
}
surface xbrz_modification::operator()(const surface& src) const

View File

@ -51,7 +51,7 @@ public:
private:
/// Map from a mod's priority() to the mods having that priority.
typedef std::map<int, std::vector<std::unique_ptr<modification>>, std::greater<int>> map_type;
typedef std::map<int, std::vector<std::shared_ptr<modification>>, std::greater<int>> map_type;
/// Map from a mod's priority() to the mods having that priority.
map_type priorities_;
};