lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] valyuta/002 2dabfcf 62/65: Try to make something a l


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/002 2dabfcf 62/65: Try to make something a little less arcane
Date: Wed, 16 Sep 2020 16:55:23 -0400 (EDT)

branch: valyuta/002
commit 2dabfcf65ccda3787443b159336d2df18d1e84c7
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Try to make something a little less arcane
---
 ihs_acctval.cpp | 8 +++++++-
 ihs_avmly.cpp   | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 663a371..e4d3a3d 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -611,7 +611,13 @@ void AccountValue::SetInitialValues()
     DcvWpCharge                 = 0.0;
 
     HoneymoonActive             = false;
-    HoneymoonValue              = currency(-std::numeric_limits<int>::max()); 
// yick
+    // -2147483647 is
+    //   -std::numeric_limits<int>::max())
+    // The apparent intention was to choose an implausibly large
+    // negative number that can be negated without the sort of
+    // surprising result seen with INT_MIN, which is -2147483648.
+    // Why that intention makes sense is another matter.
+    HoneymoonValue              = currency(-2147483647);
     if(mce_gen_curr == GenBasis_)
         {
         HoneymoonActive = yare_input_.HoneymoonEndorsement;
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index f2367ce..b822e5f 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -2057,7 +2057,13 @@ void AccountValue::TxTestHoneymoonForExpiration()
     if(HoneymoonValue <= currency() || HoneymoonValue < csv_ignoring_loan)
         {
         HoneymoonActive = false;
-        HoneymoonValue  = currency(-std::numeric_limits<int>::max()); // yick
+        // -2147483647 is
+        //   -std::numeric_limits<int>::max())
+        // The apparent intention was to choose an implausibly large
+        // negative number that can be negated without the sort of
+        // surprising result seen with INT_MIN, which is -2147483648.
+        // Why that intention makes sense is another matter.
+        HoneymoonValue  = currency(-2147483647);
         }
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]