[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master e4a6ba2 6/8: Use query<bool> with database en
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master e4a6ba2 6/8: Use query<bool> with database entities that are inherently boolean |
Date: |
Wed, 7 Nov 2018 17:11:10 -0500 (EST) |
branch: master
commit e4a6ba2b284882f69b850ae0799d22cab5a28307
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Use query<bool> with database entities that are inherently boolean
---
gpt_server.cpp | 2 +-
ihs_basicval.cpp | 4 ++--
ledger_invariant_init.cpp | 2 +-
mec_server.cpp | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gpt_server.cpp b/gpt_server.cpp
index 5122231..c17c3dc 100644
--- a/gpt_server.cpp
+++ b/gpt_server.cpp
@@ -273,7 +273,7 @@ gpt_state test_one_days_gpt_transactions
double AnnualTargetPrem = 1000000000.0; // No higher premium is
anticipated.
int const target_year =
- database.Query(DB_TgtPremFixedAtIssue)
+ database.query<bool>(DB_TgtPremFixedAtIssue)
? 0
: input.inforce_year()
;
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index cef5119..cf3e843 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -152,7 +152,7 @@ void BasicValues::Init()
PremiumTaxState_ = yare_input_.PremiumTaxState ;
if
- ( !database().Query(DB_StateApproved)
+ ( !database().query<bool>(DB_StateApproved)
&& !global_settings::instance().ash_nazg()
&& !global_settings::instance().regression_testing()
)
@@ -530,7 +530,7 @@ void BasicValues::Init7702()
local_mly_charge_add = GetAdbRates();
}
- double local_adb_limit = database().Query(DB_AdbIsQAB) ? AdbLimit : 0.0;
+ double local_adb_limit = database().query<bool>(DB_AdbIsQAB) ? AdbLimit :
0.0;
Irc7702_.reset
(new Irc7702
diff --git a/ledger_invariant_init.cpp b/ledger_invariant_init.cpp
index d57c758..861686b 100644
--- a/ledger_invariant_init.cpp
+++ b/ledger_invariant_init.cpp
@@ -280,7 +280,7 @@ void LedgerInvariant::Init(BasicValues const* b)
// DATABASE !! It would be much better, of course, to let all
// strings in class product_data vary across the same axes as
// database_entity objects.
- bool alt_form = b->database().Query(DB_UsePolicyFormAlt);
+ bool alt_form = b->database().query<bool>(DB_UsePolicyFormAlt);
dbo_name_option1 = p.datum("DboNameLevel"
);
dbo_name_option2 = p.datum("DboNameIncreasing"
);
dbo_name_rop = p.datum("DboNameReturnOfPremium"
);
diff --git a/mec_server.cpp b/mec_server.cpp
index dfdf325..3e09410 100644
--- a/mec_server.cpp
+++ b/mec_server.cpp
@@ -256,7 +256,7 @@ mec_state test_one_days_7702A_transactions
double AnnualTargetPrem = 1000000000.0; // No higher premium is
anticipated.
int const target_year =
- database.Query(DB_TgtPremFixedAtIssue)
+ database.query<bool>(DB_TgtPremFixedAtIssue)
? 0
: input.inforce_year()
;
- [lmi-commits] [lmi] master updated (259f97c -> 6c72fcf), Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 284339d 1/8: Document boolean database entities more uniformly, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master e4a6ba2 6/8: Use query<bool> with database entities that are inherently boolean,
Greg Chicares <=
- [lmi-commits] [lmi] master 39f76e4 4/8: Make a deliberate mistake more obvious in a unit test, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master f066478 7/8: Use query<T> with database entities that are inherently enumerative, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 6c72fcf 8/8: Use query<double> with database entities that are inherently floating, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 5e009d6 3/8: Adjust whitespace to improve vertical alignment, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 28105c5 5/8: Use query<int> with database entities that are inherently int, Greg Chicares, 2018/11/07
- [lmi-commits] [lmi] master 9490b4c 2/8: Avoid using floating-point constants for boolean values, Greg Chicares, 2018/11/07