added missing minimal_dim() from 1.1 branch
[ginac.git] / ginac / clifford.cpp
index b12e385ce4f03f2ca6f9bc7d6fd09342f5f6ef28..352ee194e99e001271900ee23952dec8cd5d271f 100644 (file)
@@ -208,10 +208,11 @@ bool diracgamma::contract_with(exvector::iterator self, exvector::iterator other
        GINAC_ASSERT(is_a<indexed>(*other));
        GINAC_ASSERT(is_a<diracgamma>(self->op(0)));
        unsigned char rl = ex_to<clifford>(*self).get_representation_label();
+
        ex dim = ex_to<idx>(self->op(1)).get_dim();
+       if (other->nops() > 1)
+               dim = minimal_dim(dim, ex_to<idx>(self->op(1)).get_dim());
 
-      if (other->nops() > 1)
-              dim = minimal_dim(dim, ex_to<idx>(self->op(1)).get_dim());
        if (is_a<clifford>(*other)) {
 
                // Contraction only makes sense if the represenation labels are equal