+ fast_cast to mapnik::boolean specialization

This commit is contained in:
artemp 2013-01-15 14:14:08 +00:00
parent 982aed825f
commit e8cc64a9a7

View file

@ -56,6 +56,15 @@ inline boost::optional<T> fast_cast(xml_tree const& tree, std::string const& val
}
}
template <>
inline boost::optional<mapnik::boolean> fast_cast(xml_tree const& tree, std::string const& value)
{
bool result;
if (mapnik::util::string2bool(value, result))
return boost::optional<mapnik::boolean>(result);
return boost::optional<mapnik::boolean>();
}
template <>
inline boost::optional<int> fast_cast(xml_tree const& tree, std::string const& value)
{