From 52e9cf519da6a6fc31594d1cca07f528232f807f Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 23 Feb 1996 15:22:26 +0000 Subject: [PATCH] Corretto cazzutissimo confronto tra Timporti git-svn-id: svn://10.65.10.50/trunk@2638 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/real.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/real.cpp b/include/real.cpp index 091e6faf2..57313d879 100755 --- a/include/real.cpp +++ b/include/real.cpp @@ -1615,9 +1615,8 @@ const TImporto& TImporto::normalize( int TImporto::compare(const TSortable& s) const { const TImporto& i = (const TImporto&)s; - const real d = valore() - i.valore(); - int res = d.sign(); - if (res == 0 && !is_zero()) - res = sezione() != i.sezione(); + const real v = i.sezione() == sezione() ? i.valore() : -i.valore(); + const real d = valore() - v; + const int res = d.sign(); return res; }