+ fast_cast to mapnik::boolean specialization
This commit is contained in:
parent
982aed825f
commit
e8cc64a9a7
1 changed files with 9 additions and 0 deletions
|
@ -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 <>
|
template <>
|
||||||
inline boost::optional<int> fast_cast(xml_tree const& tree, std::string const& value)
|
inline boost::optional<int> fast_cast(xml_tree const& tree, std::string const& value)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue