[Groonga-commit] groonga/groonga at 4bbf280 [master] Use more meaningful name

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Apr 10 15:34:17 JST 2016


Kouhei Sutou	2016-04-10 15:34:17 +0900 (Sun, 10 Apr 2016)

  New Revision: 4bbf28049f1928480740bc711b09d2f5dae2916d
  https://github.com/groonga/groonga/commit/4bbf28049f1928480740bc711b09d2f5dae2916d

  Message:
    Use more meaningful name

  Modified files:
    lib/proc/proc_select.c

  Modified: lib/proc/proc_select.c (+9 -9)
===================================================================
--- lib/proc/proc_select.c    2016-04-10 15:22:52 +0900 (8e58ca5)
+++ lib/proc/proc_select.c    2016-04-10 15:34:17 +0900 (8b5260a)
@@ -447,9 +447,9 @@ grn_select_drilldown(grn_ctx *ctx, grn_obj *table,
 }
 
 typedef enum {
-  NONE = 0,
-  JUST,
-  VISITED
+  TSORT_STATUS_NOT_VISITED,
+  TSORT_STATUS_VISITING,
+  TSORT_STATUS_VISITED
 } tsort_status;
 
 static grn_bool
@@ -459,12 +459,12 @@ drilldown_info_visit(grn_ctx *ctx, grn_obj *labels,
                      grn_id to, grn_obj *ids)
 {
   switch (visits[to - 1]) {
-  case JUST:
+  case TSORT_STATUS_VISITING:
     return GRN_TRUE;
-  case VISITED:
+  case TSORT_STATUS_VISITED:
     return GRN_FALSE;
-  default:
-    visits[to - 1] = JUST;
+  case TSORT_STATUS_NOT_VISITED:
+    visits[to - 1] = TSORT_STATUS_VISITING;
     {
       drilldown_info *drilldown = &(drilldowns[to - 1]);
       if (drilldown->table_name) {
@@ -478,7 +478,7 @@ drilldown_info_visit(grn_ctx *ctx, grn_obj *labels,
         }
       }
     }
-    visits[to - 1] = VISITED;
+    visits[to - 1] = TSORT_STATUS_VISITED;
     grn_uvector_add_element(ctx, ids, to - 1, 0);
     return GRN_FALSE;
   }
@@ -517,7 +517,7 @@ drilldown_info_tsort_init(grn_ctx *ctx, grn_obj *labels,
     grn_id id;
     id = grn_table_add(ctx, labels, drilldown->label, drilldown->label_len, &added);
     if (added) {
-      visits[id - 1] = NONE;
+      visits[id - 1] = TSORT_STATUS_NOT_VISITED;
     }
   }
 }
-------------- next part --------------
HTML����������������������������...
Download 



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