use safe_cast to avoid -Wsign-conversion warnings

This commit is contained in:
Dane Springmeyer 2015-06-13 19:23:36 -07:00
parent bb2e938302
commit 563bd1adc7

View file

@ -4,6 +4,7 @@
// mapnik
#include <mapnik/params.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/safe_cast.hpp>
#include "../test/cleanup.hpp"
// stl
@ -26,8 +27,8 @@ protected:
public:
test_case(mapnik::parameters const& params)
: params_(params),
threads_(*params.get<mapnik::value_integer>("threads",0)),
iterations_(*params.get<mapnik::value_integer>("iterations",0))
threads_(mapnik::safe_cast<std::size_t>(*params.get<mapnik::value_integer>("threads",0))),
iterations_(mapnik::safe_cast<std::size_t>(*params.get<mapnik::value_integer>("iterations",0)))
{}
std::size_t threads() const
{