mapnik::value

to_expression_string - add missing specialization
for mapnik::value_integer and remove usage of std::stringstream
This commit is contained in:
artemp 2013-05-08 16:51:28 +01:00
parent b086e2d20c
commit 4138a70a52

View file

@ -40,8 +40,6 @@
#include "hash_variant.hpp" #include "hash_variant.hpp"
// stl // stl
#include <iostream>
#include <sstream>
#include <string> #include <string>
#include <cmath> #include <cmath>
@ -670,6 +668,13 @@ struct to_expression_string : public boost::static_visitor<std::string>
return "'" + utf8 + "'"; return "'" + utf8 + "'";
} }
std::string operator() (value_integer val) const
{
std::string output;
util::to_string(output,val);
return output;
}
std::string operator() (value_double val) const std::string operator() (value_double val) const
{ {
std::string output; std::string output;
@ -687,14 +692,6 @@ struct to_expression_string : public boost::static_visitor<std::string>
boost::ignore_unused_variable_warning(val); boost::ignore_unused_variable_warning(val);
return "null"; return "null";
} }
template <typename T>
std::string operator() (T val) const
{
std::stringstream ss;
ss << val;
return ss.str();
}
}; };
struct to_double : public boost::static_visitor<value_double> struct to_double : public boost::static_visitor<value_double>