lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] valyuta/005 afa4967 8/9: Make lmi build without curr


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/005 afa4967 8/9: Make lmi build without currency class
Date: Wed, 20 Jan 2021 00:51:33 -0500 (EST)

branch: valyuta/005
commit afa4967feb30b53cb685a1a33e9ba216e38c23a8
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Make lmi build without currency class
---
 ihs_acctval.cpp | 4 ++++
 ihs_avmly.cpp   | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 19f573e..eee40b1 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -652,7 +652,11 @@ void AccountValue::SetInitialValues()
     // which is the identity element for std::max(). Here, it's nearly
     // the equivalent for currency::data_type; dividing it by 101 is a
     // casual defense against commuting between dollars and cents.
+#if defined USE_CURRENCY_CLASS
     HoneymoonValue = 
from_cents(-std::numeric_limits<currency::data_type>::max() / 101);
+#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;
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index e9119f1..bc15cde 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -2045,7 +2045,11 @@ void AccountValue::TxTestHoneymoonForExpiration()
         // which is the identity element for std::max(). Here, it's nearly
         // the equivalent for currency::data_type; dividing it by 101 is a
         // casual defense against commuting between dollars and cents.
+#if defined USE_CURRENCY_CLASS
         HoneymoonValue  = 
from_cents(-std::numeric_limits<currency::data_type>::max() / 101);
+#else  // !defined USE_CURRENCY_CLASS
+        HoneymoonValue = -std::numeric_limits<double>::max();
+#endif // ! defined USE_CURRENCY_CLASS
         }
 }
 



reply via email to

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