lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 62b80c4 7/8: Initialize honeymoon value as cu


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 62b80c4 7/8: Initialize honeymoon value as currency, not double
Date: Tue, 26 Jan 2021 08:12:31 -0500 (EST)

branch: master
commit 62b80c42094c943cf58f83a128c5e4e251048a8a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Initialize honeymoon value as currency, not double
---
 ihs_acctval.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 4465016..d248905 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -642,7 +642,12 @@ void AccountValue::SetInitialValues()
     DcvWpCharge                 = 0.0;
 
     HoneymoonActive             = false;
-    HoneymoonValue              = -std::numeric_limits<double>::max();
+    // Identity element for std::max(), disregarding -INF and NaN.
+#if defined USE_CURRENCY_CLASS
+    HoneymoonValue = 
-from_cents(std::numeric_limits<currency::data_type>::max());
+#else  // !defined USE_CURRENCY_CLASS
+    HoneymoonValue = -std::numeric_limits<double>::max();
+#endif // !defined USE_CURRENCY_CLASS
     if(mce_gen_curr == GenBasis_)
         {
         HoneymoonActive = yare_input_.HoneymoonEndorsement;



reply via email to

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