- {
- const struct ctables_cell_value *p_cv = &ctx->cell->axes[a].cvs[i];
- const struct ctables_cell_value *t_cv = &tc->axes[a].cvs[i];
-
- if (i == nest->scale_idx)
- {
- /* Nothing to do. */
- }
- else if (a == ctx->pc_a && i == ctx->pc_a_idx)
- {
- /* XXX anything other than a constant.... */
- if (t_cv->category != cat || t_cv->value.f != cat->number)
- goto not_equal;
- }
- else if (p_cv->category != t_cv->category
- || (p_cv->category->type != CCT_TOTAL
- && p_cv->category->type != CCT_SUBTOTAL
- && p_cv->category->type != CCT_POSTCOMPUTE
- && !value_equal (&p_cv->value,
- &t_cv->value,
- var_get_width (nest->vars[i]))))
- goto not_equal;
- }
+ if (i != nest->scale_idx)
+ {
+ const struct ctables_cell_value *p_cv
+ = (a == ctx->pc_a && i == ctx->pc_a_idx ? pc_cv
+ : &ctx->cell->axes[a].cvs[i]);
+ const struct ctables_cell_value *t_cv = &tc->axes[a].cvs[i];
+ if (p_cv->category != t_cv->category
+ || (p_cv->category->type != CCT_TOTAL
+ && p_cv->category->type != CCT_SUBTOTAL
+ && p_cv->category->type != CCT_POSTCOMPUTE
+ && !value_equal (&p_cv->value,
+ &t_cv->value,
+ var_get_width (nest->vars[i]))))
+ goto not_equal;
+ }