[test] Use BOOST_GEOMETRY_CONDITION macro for constant conditions.

This commit is contained in:
Adam Wulkiewicz 2015-02-11 15:54:56 +01:00
parent 6b438738d8
commit eceba44876
2 changed files with 3 additions and 10 deletions

View File

@ -242,8 +242,8 @@ void test_all()
test_wrong_wkt<bg::model::box<P> >("BOX(1 1,2 2,3 3)", "box should have 2"); test_wrong_wkt<bg::model::box<P> >("BOX(1 1,2 2,3 3)", "box should have 2");
test_wrong_wkt<bg::model::box<P> >("BOX(1 1,2 2) )", "too much tokens"); test_wrong_wkt<bg::model::box<P> >("BOX(1 1,2 2) )", "too much tokens");
if (boost::is_floating_point<T>::type::value if ( BOOST_GEOMETRY_CONDITION(boost::is_floating_point<T>::type::value
|| ! boost::is_fundamental<T>::type::value) || ! boost::is_fundamental<T>::type::value ) )
{ {
test_wkt<P>("POINT(1.1 2.1)", 1); test_wkt<P>("POINT(1.1 2.1)", 1);
} }

View File

@ -72,14 +72,7 @@ struct access<rw_lon_lat_point<CoordinateType, CoordinateSystem>, Dimension>
void set(rw_lon_lat_point<CoordinateType, CoordinateSystem>& p, void set(rw_lon_lat_point<CoordinateType, CoordinateSystem>& p,
CoordinateType const& value) CoordinateType const& value)
{ {
if (Dimension == 0) ( Dimension == 0 ? p.longitude : p.latitude ) = value;
{
p.longitude = value;
}
else
{
p.latitude = value;
}
} }
}; };