n_drop = a != PIVOT_AXIS_LAYER;
else if (t->clabels_to_axis != PIVOT_AXIS_LAYER)
n_drop = a == t->clabels_from_axis ? 2 : 0;
+ else if (a != PIVOT_AXIS_LAYER && a != t->clabels_from_axis)
+ n_drop = 1;
else
- {
- n_drop = a != PIVOT_AXIS_LAYER && a != t->clabels_from_axis;
- drop_inner = a == t->clabels_from_axis;
- }
+ drop_inner = a == t->clabels_from_axis;
break;
case CTAT_LAYERROW:
case CTAT_COL:
if (a == atb)
{
- if (t->label_axis[ata] == atb)
- ;
- else if (t->label_axis[atb] == ata)
- drop_inner = true;
- else if (t->label_axis[atb] == PIVOT_AXIS_LAYER)
+ if (t->clabels_from_axis == atb)
drop_inner = true;
- else
+ else if (t->clabels_to_axis != atb)
n_drop = 1;
}
- if (a == ata && t->label_axis[ata] == atb)
- n_drop++;
+ else if (a == ata)
+ n_drop = t->label_axis[ata] == atb;
break;
case CTAT_LAYER:
case CTAT_TABLE:
- n_drop = 0;
break;
}