Merge branch 'master' of github.com:mapnik/mapnik into render-time-variables

This commit is contained in:
Dane Springmeyer 2014-05-12 08:45:15 -07:00
commit 1e3f062af8
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
{