lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 0f80794 1/2: Assert precondition before (not


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 0f80794 1/2: Assert precondition before (not after) relying on it
Date: Sun, 22 Jan 2017 11:48:23 +0000 (UTC)

branch: master
commit 0f807941665ceaf09cc324c1143607053a64a1cb
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Assert precondition before (not after) relying on it
---
 custom_io_0.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/custom_io_0.cpp b/custom_io_0.cpp
index eeaef3d..a6b2dea 100644
--- a/custom_io_0.cpp
+++ b/custom_io_0.cpp
@@ -62,6 +62,8 @@ std::string adjust_interest_rates
     ,std::vector<double> const& declared_rate
     )
 {
+    LMI_ASSERT(!declared_rate.empty());
+
     // The customer's front end provides two interest rates: one for
     // the first year only, and another for all renewal years. It's
     // our understanding that the "InterestRateOngoing" is enabled iff
@@ -115,7 +117,6 @@ std::string adjust_interest_rates
     // and the current declared rate is used. It is expected that
     // this will not be acceptable for long.
 
-    LMI_ASSERT(!declared_rate.empty());
     std::vector<double> general_account_rate(declared_rate);
 
     if(credited_rates_fit_customer_paradigm)



reply via email to

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