From af7b04f510bd79be632e360e766e181a4b6986b8 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 30 Apr 2023 11:50:41 +0200 Subject: Remove broken aperture macro optimization --- gerbonara/aperture_macros/expression.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gerbonara/aperture_macros') diff --git a/gerbonara/aperture_macros/expression.py b/gerbonara/aperture_macros/expression.py index af43d9a..ca8c15c 100644 --- a/gerbonara/aperture_macros/expression.py +++ b/gerbonara/aperture_macros/expression.py @@ -199,9 +199,9 @@ class OperatorExpression(Expression): l = self.l.optimized(variable_binding) r = self.r.optimized(variable_binding) - if self.op in (operator.add, operator.mul): - if id(r) < id(l): - l, r = r, l + #if self.op in (operator.add, operator.mul): + # if id(r) < id(l): + # l, r = r, l if isinstance(l, ConstantExpression) and isinstance(r, ConstantExpression): return ConstantExpression(self.op(float(l), float(r))) -- cgit