susumu.yata
null+****@clear*****
Mon Oct 27 16:30:40 JST 2014
susumu.yata 2014-10-27 16:30:40 +0900 (Mon, 27 Oct 2014) New Revision: 43a0b3c324a13c1a9e455710db4d4f30d0f1d660 https://github.com/groonga/grnxx/commit/43a0b3c324a13c1a9e455710db4d4f30d0f1d660 Message: Use another constructor. (#94) Modified files: include/grnxx/new_types/geo_point.hpp Modified: include/grnxx/new_types/geo_point.hpp (+1 -7) =================================================================== --- include/grnxx/new_types/geo_point.hpp 2014-10-27 16:26:07 +0900 (e6e5e90) +++ include/grnxx/new_types/geo_point.hpp 2014-10-27 16:30:40 +0900 (0cae020) @@ -32,13 +32,7 @@ class GeoPoint { // NOTE: gcc-4.8 does not support use of the value being constructed in // a constant exression. GeoPoint(Int latitude, Int longitude) - : latitude_(((latitude.value() < min_latitude()) || - (latitude.value() > max_latitude()) || - (longitude.value() < min_longitude()) || - (longitude.value() > max_longitude())) ? - na_latitude() : latitude.value()), - longitude_((latitude_ == na_latitude()) ? - na_longitude() : longitude.value()) {} + : GeoPoint(latitude.value(), longitude.value()) {} explicit constexpr GeoPoint(NA) : latitude_(na_latitude()), longitude_(na_longitude()) {} -------------- next part -------------- HTML����������������������������...Télécharger