[Groonga-commit] groonga/grnxx at 04c5120 [new_data_types] Fix the direction of a comparison operator. (#94)

Back to archive index

susumu.yata null+****@clear*****
Fri Nov 7 13:51:57 JST 2014


susumu.yata	2014-11-07 13:51:57 +0900 (Fri, 07 Nov 2014)

  New Revision: 04c51204561fb7c7942e4c500b950657e4565c81
  https://github.com/groonga/grnxx/commit/04c51204561fb7c7942e4c500b950657e4565c81

  Message:
    Fix the direction of a comparison operator. (#94)

  Modified files:
    include/grnxx/data_types/scalar/geo_point.hpp

  Modified: include/grnxx/data_types/scalar/geo_point.hpp (+2 -2)
===================================================================
--- include/grnxx/data_types/scalar/geo_point.hpp    2014-11-07 13:35:39 +0900 (89eda4f)
+++ include/grnxx/data_types/scalar/geo_point.hpp    2014-11-07 13:51:57 +0900 (9a77a5b)
@@ -47,11 +47,11 @@ class GeoPoint {
     // N/A (NaN) is rejected due to LOGICAL_AND.
     if ((latitude_in_degrees.value() >= -90.0) &&
         (latitude_in_degrees.value() <= 90.0) &&
-        (longitude_in_degrees.value() <= -180.0) &&
+        (longitude_in_degrees.value() >= -180.0) &&
         (longitude_in_degrees.value() <= 180.0)) {
       int64_t latitude = latitude_in_degrees.value() * 60 * 60 * 1000;
       int64_t longitude = longitude_in_degrees.value() * 60 * 60 * 1000;
-      if ((latitude <= min_latitude()) || (latitude >= max_latitude())) {
+      if ((latitude == min_latitude()) || (latitude == max_latitude())) {
         longitude = 0;
       } else if (longitude == max_longitude()) {
         longitude = min_longitude();
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index