pivot-table: Minor coding style improvements.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Jan 2021 06:18:35 +0000 (22:18 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Jan 2021 06:18:35 +0000 (22:18 -0800)
src/output/pivot-table.c

index aa3b9b51c25b28185c2132ecd875cf403e4497d6..671544ef06906a513e8c5099827fccc2b1b7f3a4 100644 (file)
@@ -1265,7 +1265,6 @@ pivot_table_move_dimension (struct pivot_table *table,
       return;
     }
 
-
   /* Update the current layer, if necessary.  If we're moving within the layer
      axis, preserve the current layer. */
   if (dim->axis_type == PIVOT_AXIS_LAYER)
@@ -1584,8 +1583,8 @@ pivot_table_convert_indexes_ptod (const struct pivot_table *table,
       for (size_t j = 0; j < axis->n_dimensions; j++)
         {
           const struct pivot_dimension *d = axis->dimensions[j];
-          dindexes[d->top_index]
-            = d->presentation_leaves[pindexes[i][j]]->data_index;
+          size_t pindex = pindexes[i][j];
+          dindexes[d->top_index] = d->presentation_leaves[pindex]->data_index;
         }
     }
 }