[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
}
}
- [lmi-commits] [lmi] valyuta/005 updated (4401725 -> ca84095), Greg Chicares, 2021/01/20
- [lmi-commits] [lmi] valyuta/005 4483b09 1/9: Avoid passing 'currency' by const reference, Greg Chicares, 2021/01/20
- [lmi-commits] [lmi] valyuta/005 1dd82ec 3/9: Rationalize argument names, Greg Chicares, 2021/01/20
- [lmi-commits] [lmi] valyuta/005 cb722b2 4/9: Replace a complaint with a solution, Greg Chicares, 2021/01/20
- [lmi-commits] [lmi] valyuta/005 2e73521 5/9: Begin to conditionalize use of currency class, Greg Chicares, 2021/01/20
- [lmi-commits] [lmi] valyuta/005 b835c6d 2/9: Partially revert the last commit, Greg Chicares, 2021/01/20
- [lmi-commits] [lmi] valyuta/005 afa4967 8/9: Make lmi build without currency class,
Greg Chicares <=
- [lmi-commits] [lmi] valyuta/005 ca84095 9/9: Record speed measurements, Greg Chicares, 2021/01/20
- [lmi-commits] [lmi] valyuta/005 df368ca 6/9: Replace currency::d() with d(currency) almost everywhere, Greg Chicares, 2021/01/20
- [lmi-commits] [lmi] valyuta/005 75f8adf 7/9: Add and use free function from_cents(), Greg Chicares, 2021/01/20