Merge branch 'master' of github.com:mapnik/mapnik

This commit is contained in:
Dane Springmeyer 2014-05-12 09:20:32 -07:00
commit 760d3c967e
2 changed files with 17 additions and 0 deletions

View file

@ -496,6 +496,7 @@ struct div: public boost::static_visitor<V>
template <typename T>
value_type operator() (T lhs, T rhs) const
{
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
return lhs / rhs;
}
@ -514,11 +515,13 @@ struct div: public boost::static_visitor<V>
value_type operator() (value_double lhs, value_integer rhs) const
{
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
return lhs / rhs;
}
value_type operator() (value_integer lhs, value_double rhs) const
{
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
return lhs / rhs;
}
};

View file

@ -53,12 +53,26 @@ struct value_null
return true;
}
template <typename T>
bool operator==(T const& other) const
{
boost::ignore_unused_variable_warning(other);
return false;
}
bool operator!=(value_null const& other) const
{
boost::ignore_unused_variable_warning(other);
return false;
}
template <typename T>
bool operator!=(T const& other) const
{
boost::ignore_unused_variable_warning(other);
return true;
}
template <typename T>
value_null operator+ (T const& other) const
{