
Module: ppl/ppl Branch: bounded_arithmetic Commit: 23dc642f53f4c94db0a5ac1436d72462944bc3a6 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=23dc642f53f4c...
Author: Alberto Gioia alberto.gioia1@studenti.unipr.it Date: Mon Sep 19 12:33:02 2011 +0200
Changed behavior of the function operator<< and operator<< about second operand equal to 0 and eliminated case equal to 1.
---
src/Linear_Form.templates.hh | 14 ++------------ 1 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/Linear_Form.templates.hh b/src/Linear_Form.templates.hh index 15fd3b3..b7f8764 100644 --- a/src/Linear_Form.templates.hh +++ b/src/Linear_Form.templates.hh @@ -431,15 +431,10 @@ template <typename C> Linear_Form<C>& operator<<(Linear_Form<C>& f, const C& n) { C zero(0); - C one(1);
dimension_type f_size = f.size();
- if (n == zero) { - f = Linear_Form<C>(zero); - return f; - } - else if (n == one) + if (n == zero) return f; else if (f >= zero || f < zero) { for (dimension_type i = f_size; i-- > 0; ) @@ -456,15 +451,10 @@ template <typename C> Linear_Form<C>& operator>>(Linear_Form<C>& f, const C& n) { C zero(0); - C one(1);
dimension_type f_size = f.size();
- if (n == zero) { - f = Linear_Form<C>(zero); - return f; - } - if (n == one) + if (n == zero) return f; else if (f >= zero || f < zero) { for (dimension_type i = f_size; i-- > 0; )