[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [4927] Assert another postcondition
From: |
Greg Chicares |
Subject: |
[lmi-commits] [4927] Assert another postcondition |
Date: |
Sat, 08 May 2010 14:00:52 +0000 |
Revision: 4927
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4927
Author: chicares
Date: 2010-05-08 14:00:48 +0000 (Sat, 08 May 2010)
Log Message:
-----------
Assert another postcondition
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/database.cpp
lmi/trunk/ihs_database.cpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2010-05-08 13:47:11 UTC (rev 4926)
+++ lmi/trunk/ChangeLog 2010-05-08 14:00:48 UTC (rev 4927)
@@ -25558,3 +25558,26 @@
dbvalue.hpp
Remove a disused member function.
+20100508T1343Z <address@hidden> [712]
+
+ database.cpp
+ ihs_database.cpp
+Reimplement product_database::Query(vector).
+
+20100508T1346Z <address@hidden> [712]
+
+ dbvalue.cpp
+Improve a diagnostic.
+
+20100508T1347Z <address@hidden> [712]
+
+ actuarial_table.cpp
+ oecumenic_enumerations.hpp
+Refactor.
+
+20100508T1400Z <address@hidden> [712]
+
+ database.cpp
+ ihs_database.cpp
+Assert another postcondition.
+
Modified: lmi/trunk/database.cpp
===================================================================
--- lmi/trunk/database.cpp 2010-05-08 13:47:11 UTC (rev 4926)
+++ lmi/trunk/database.cpp 2010-05-08 14:00:48 UTC (rev 4927)
@@ -32,6 +32,8 @@
#include "assert_lmi.hpp"
#include "dbdict.hpp"
#include "dbnames.hpp"
+#include "dbvalue.hpp"
+#include "oecumenic_enumerations.hpp" // methuselah
#include "yare_input.hpp"
#include <algorithm> // std::copy(), std::min()
@@ -97,10 +99,7 @@
{
index_ = database_index(Gender, Class, Smoker, IssueAge, UWBasis, State);
length_ = static_cast<int>(*GetEntry(DB_EndtAge)[index_]) - IssueAge;
- if(length_ <= 0)
- {
- fatal_error() << "Maturity age precedes issue age." << LMI_FLUSH;
- }
+ LMI_ASSERT(0 < length_ && length_ <= methuselah);
}
//===========================================================================
Modified: lmi/trunk/ihs_database.cpp
===================================================================
--- lmi/trunk/ihs_database.cpp 2010-05-08 13:47:11 UTC (rev 4926)
+++ lmi/trunk/ihs_database.cpp 2010-05-08 14:00:48 UTC (rev 4927)
@@ -37,11 +37,11 @@
#include "dbdict.hpp"
#include "dbnames.hpp"
#include "dbvalue.hpp"
-#include "oecumenic_enumerations.hpp"
+#include "oecumenic_enumerations.hpp" // methuselah
#include "product_data.hpp"
#include "yare_input.hpp"
-#include <algorithm> // std::copy(), std::max(), std::min()
+#include <algorithm> // std::copy(), std::min()
#include <iterator> // ostream_iterator
//============================================================================
@@ -154,10 +154,7 @@
// endowment age doesn't vary by duration.
// length_ = Query(DB_EndtAge) - IssueAge;
length_ = static_cast<int>(*GetEntry(DB_EndtAge)[index_]) - IssueAge;
- if(length_ <= 0)
- {
- fatal_error() << "Maturity age precedes issue age." << LMI_FLUSH;
- }
+ LMI_ASSERT(0 < length_ && length_ <= methuselah);
constrain_scalar(DB_EndtAge);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [4927] Assert another postcondition,
Greg Chicares <=