Merge branch 'master' of github.com:mapnik/mapnik into render-time-variables
This commit is contained in:
commit
1e3f062af8
2 changed files with 17 additions and 0 deletions
|
@ -496,6 +496,7 @@ struct div: public boost::static_visitor<V>
|
||||||
template <typename T>
|
template <typename T>
|
||||||
value_type operator() (T lhs, T rhs) const
|
value_type operator() (T lhs, T rhs) const
|
||||||
{
|
{
|
||||||
|
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
|
||||||
return lhs / rhs;
|
return lhs / rhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,11 +515,13 @@ struct div: public boost::static_visitor<V>
|
||||||
|
|
||||||
value_type operator() (value_double lhs, value_integer rhs) const
|
value_type operator() (value_double lhs, value_integer rhs) const
|
||||||
{
|
{
|
||||||
|
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
|
||||||
return lhs / rhs;
|
return lhs / rhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
value_type operator() (value_integer lhs, value_double rhs) const
|
value_type operator() (value_integer lhs, value_double rhs) const
|
||||||
{
|
{
|
||||||
|
if (rhs == 0) return std::numeric_limits<value_type>::infinity();
|
||||||
return lhs / rhs;
|
return lhs / rhs;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -53,12 +53,26 @@ struct value_null
|
||||||
return true;
|
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
|
bool operator!=(value_null const& other) const
|
||||||
{
|
{
|
||||||
boost::ignore_unused_variable_warning(other);
|
boost::ignore_unused_variable_warning(other);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
bool operator!=(T const& other) const
|
||||||
|
{
|
||||||
|
boost::ignore_unused_variable_warning(other);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
value_null operator+ (T const& other) const
|
value_null operator+ (T const& other) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue