pivot-table: Make PIVOT_N_AXES a macro instead of an enum.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 3 Jul 2022 00:23:49 +0000 (17:23 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 3 Jul 2022 00:23:49 +0000 (17:23 -0700)
This prevents warnings about "switch" statements without a "case"
for PIVOT_N_AXES.

src/output/pivot-table.h

index 88edb62031c5227b304bb62a761704d25a03b47c..e374596184889f107ba2ecdfef60f44b3be671c8 100644 (file)
@@ -177,9 +177,8 @@ enum pivot_axis_type
   {
     PIVOT_AXIS_LAYER,
     PIVOT_AXIS_ROW,
-    PIVOT_AXIS_COLUMN,
-
-    PIVOT_N_AXES
+    PIVOT_AXIS_COLUMN
+#define PIVOT_N_AXES 3
   };
 
 const char *pivot_axis_type_to_string (enum pivot_axis_type);