lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 3b1e21e 2/3: Use the "query" overload just ad


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 3b1e21e 2/3: Use the "query" overload just added, improving const correctness
Date: Tue, 6 Nov 2018 08:48:53 -0500 (EST)

branch: master
commit 3b1e21e8043116529a5951ce171af7a618c4215f
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Use the "query" overload just added, improving const correctness
---
 gpt_input.cpp             | 6 ++----
 ihs_basicval.cpp          | 3 +--
 input_harmonization.cpp   | 6 ++----
 ledger_invariant_init.cpp | 3 +--
 mec_input.cpp             | 6 ++----
 5 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/gpt_input.cpp b/gpt_input.cpp
index ed9c06b..465dcf4 100644
--- a/gpt_input.cpp
+++ b/gpt_input.cpp
@@ -402,8 +402,7 @@ void gpt_input::DoHarmonize()
             )
         );
 
-    oenum_alb_or_anb alb_anb;
-    database_->query_into(alb_anb, DB_AgeLastOrNearest);
+    auto const alb_anb = 
database_->query<oenum_alb_or_anb>(DB_AgeLastOrNearest);
 
     DateOfBirth.minimum_and_maximum
         (minimum_birthdate(IssueAge.maximum(), EffectiveDate.value(), alb_anb)
@@ -545,8 +544,7 @@ void gpt_input::DoTransmogrify()
     InforceContractYear  = ym1.first;
     InforceContractMonth = ym1.second;
 
-    oenum_alb_or_anb alb_anb;
-    database_->query_into(alb_anb, DB_AgeLastOrNearest);
+    auto const alb_anb = 
database_->query<oenum_alb_or_anb>(DB_AgeLastOrNearest);
 
     int apparent_age = attained_age
         (DateOfBirth.value()
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 7a33dde..86d0ad7 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -757,8 +757,7 @@ void BasicValues::SetPermanentInvariants()
     // definitions, and 'DefinitionOfMaterialChange' will be removed.
     if(!global_settings::instance().ash_nazg())
         {
-        mcenum_defn_material_change z;
-        database().query_into(z, DB_CvatMatChangeDefn);
+        auto const z = 
database().query<mcenum_defn_material_change>(DB_CvatMatChangeDefn);
         DefnMaterialChange_ = (mce_gpt == DefnLifeIns_) ? mce_adjustment_event 
: z;
         }
     database().query_into(Equiv7702DBO3, DB_Equiv7702Dbo3);
diff --git a/input_harmonization.cpp b/input_harmonization.cpp
index 58ffb7e..b4f978f 100644
--- a/input_harmonization.cpp
+++ b/input_harmonization.cpp
@@ -271,8 +271,7 @@ void Input::DoHarmonize()
             )
         );
 
-    oenum_alb_or_anb alb_anb;
-    database_->query_into(alb_anb, DB_AgeLastOrNearest);
+    auto const alb_anb = 
database_->query<oenum_alb_or_anb>(DB_AgeLastOrNearest);
 
     DateOfBirth.minimum_and_maximum
         (minimum_birthdate(IssueAge.maximum(), EffectiveDate.value(), alb_anb)
@@ -910,8 +909,7 @@ void Input::DoTransmogrify()
         GeneralAccountRate = current_credited_rate(*database_);
         }
 
-    oenum_alb_or_anb alb_anb;
-    database_->query_into(alb_anb, DB_AgeLastOrNearest);
+    auto const alb_anb = 
database_->query<oenum_alb_or_anb>(DB_AgeLastOrNearest);
 
     int apparent_age = attained_age
         (DateOfBirth.value()
diff --git a/ledger_invariant_init.cpp b/ledger_invariant_init.cpp
index b34c854..63c177c 100644
--- a/ledger_invariant_init.cpp
+++ b/ledger_invariant_init.cpp
@@ -440,8 +440,7 @@ void LedgerInvariant::Init(BasicValues const* b)
     // database if class product_data is rewritten to encompass
     // variation across axes (as class DBDictionary does).
     //
-    oenum_smoking_or_tobacco smoke_or_tobacco;
-    b->database().query_into(smoke_or_tobacco, DB_SmokeOrTobacco);
+    auto const smoke_or_tobacco = 
b->database().query<oenum_smoking_or_tobacco>(DB_SmokeOrTobacco);
     if(oe_tobacco_nontobacco == smoke_or_tobacco)
         {
         switch(b->yare_input_.Smoking)
diff --git a/mec_input.cpp b/mec_input.cpp
index f8b18fe..3a93c3e 100644
--- a/mec_input.cpp
+++ b/mec_input.cpp
@@ -369,8 +369,7 @@ void mec_input::DoHarmonize()
             )
         );
 
-    oenum_alb_or_anb alb_anb;
-    database_->query_into(alb_anb, DB_AgeLastOrNearest);
+    auto const alb_anb = 
database_->query<oenum_alb_or_anb>(DB_AgeLastOrNearest);
 
     DateOfBirth.minimum_and_maximum
         (minimum_birthdate(IssueAge.maximum(), EffectiveDate.value(), alb_anb)
@@ -492,8 +491,7 @@ void mec_input::DoTransmogrify()
     InforceContractYear  = ym1.first;
     InforceContractMonth = ym1.second;
 
-    oenum_alb_or_anb alb_anb;
-    database_->query_into(alb_anb, DB_AgeLastOrNearest);
+    auto const alb_anb = 
database_->query<oenum_alb_or_anb>(DB_AgeLastOrNearest);
 
     int apparent_age = attained_age
         (DateOfBirth.value()



reply via email to

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