use safe_cast to avoid -Wsign-conversion warnings
This commit is contained in:
parent
bb2e938302
commit
563bd1adc7
1 changed files with 3 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
||||||
// mapnik
|
// mapnik
|
||||||
#include <mapnik/params.hpp>
|
#include <mapnik/params.hpp>
|
||||||
#include <mapnik/value_types.hpp>
|
#include <mapnik/value_types.hpp>
|
||||||
|
#include <mapnik/safe_cast.hpp>
|
||||||
#include "../test/cleanup.hpp"
|
#include "../test/cleanup.hpp"
|
||||||
|
|
||||||
// stl
|
// stl
|
||||||
|
@ -26,8 +27,8 @@ protected:
|
||||||
public:
|
public:
|
||||||
test_case(mapnik::parameters const& params)
|
test_case(mapnik::parameters const& params)
|
||||||
: params_(params),
|
: params_(params),
|
||||||
threads_(*params.get<mapnik::value_integer>("threads",0)),
|
threads_(mapnik::safe_cast<std::size_t>(*params.get<mapnik::value_integer>("threads",0))),
|
||||||
iterations_(*params.get<mapnik::value_integer>("iterations",0))
|
iterations_(mapnik::safe_cast<std::size_t>(*params.get<mapnik::value_integer>("iterations",0)))
|
||||||
{}
|
{}
|
||||||
std::size_t threads() const
|
std::size_t threads() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue