[Groonga-commit] groonga/groonga [master] [geo] use the same order for retrieving keys. refs #1173

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 18日 (金) 15:32:01 JST


Kouhei Sutou	2011-11-18 06:32:01 +0000 (Fri, 18 Nov 2011)

  New Revision: a6f9b7ca4d5eeba29ff0a21943cc17ad0cc0797a

  Log:
    [geo] use the same order for retrieving keys. refs #1173

  Modified files:
    lib/geo.c

  Modified: lib/geo.c (+16 -16)
===================================================================
--- lib/geo.c    2011-11-18 06:30:03 +0000 (f478e2e)
+++ lib/geo.c    2011-11-18 06:32:01 +0000 (22f1108)
@@ -1190,21 +1190,21 @@ grn_geo_cursor_entry_next(grn_ctx *ctx,
         next_entry1.latitude_inner = GRN_TRUE;
       }
 
-      if (next_entry0.latitude_inner ||
-          next_entry0.top_included || next_entry0.bottom_included) {
-        if (grn_geo_cursor_entry_next_push(ctx, cursor, &next_entry0)) {
+      if (next_entry1.latitude_inner ||
+          next_entry1.top_included || next_entry1.bottom_included) {
+        if (grn_geo_cursor_entry_next_push(ctx, cursor, &next_entry1)) {
           pushed = GRN_TRUE;
 #ifdef GEO_DEBUG
-          printf("%d: latitude: push 0\n", next_entry0.target_bit);
+          printf("%d: latitude: push 1\n", next_entry1.target_bit);
 #endif
         }
       }
-      if (next_entry1.latitude_inner ||
-          next_entry1.top_included || next_entry1.bottom_included) {
-        if (grn_geo_cursor_entry_next_push(ctx, cursor, &next_entry1)) {
+      if (next_entry0.latitude_inner ||
+          next_entry0.top_included || next_entry0.bottom_included) {
+        if (grn_geo_cursor_entry_next_push(ctx, cursor, &next_entry0)) {
           pushed = GRN_TRUE;
 #ifdef GEO_DEBUG
-          printf("%d: latitude: push 1\n", next_entry1.target_bit);
+          printf("%d: latitude: push 0\n", next_entry0.target_bit);
 #endif
         }
       }
@@ -1228,21 +1228,21 @@ grn_geo_cursor_entry_next(grn_ctx *ctx,
         next_entry0.longitude_inner = GRN_TRUE;
       }
 
-      if (next_entry0.longitude_inner ||
-          next_entry0.left_included || next_entry0.right_included) {
-        if (grn_geo_cursor_entry_next_push(ctx, cursor, &next_entry0)) {
+      if (next_entry1.longitude_inner ||
+          next_entry1.left_included || next_entry1.right_included) {
+        if (grn_geo_cursor_entry_next_push(ctx, cursor, &next_entry1)) {
           pushed = GRN_TRUE;
 #ifdef GEO_DEBUG
-          printf("%d: longitude: push 0\n", next_entry0.target_bit);
+          printf("%d: longitude: push 1\n", next_entry1.target_bit);
 #endif
         }
       }
-      if (next_entry1.longitude_inner ||
-          next_entry1.left_included || next_entry1.right_included) {
-        if (grn_geo_cursor_entry_next_push(ctx, cursor, &next_entry1)) {
+      if (next_entry0.longitude_inner ||
+          next_entry0.left_included || next_entry0.right_included) {
+        if (grn_geo_cursor_entry_next_push(ctx, cursor, &next_entry0)) {
           pushed = GRN_TRUE;
 #ifdef GEO_DEBUG
-          printf("%d: longitude: push 1\n", next_entry1.target_bit);
+          printf("%d: longitude: push 0\n", next_entry0.target_bit);
 #endif
         }
       }




Groonga-commit メーリングリストの案内
Back to archive index