lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [5734] Refactor for concinnity


From: Greg Chicares
Subject: [lmi-commits] [5734] Refactor for concinnity
Date: Sun, 19 May 2013 11:31:28 +0000

Revision: 5734
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5734
Author:   chicares
Date:     2013-05-19 11:31:27 +0000 (Sun, 19 May 2013)
Log Message:
-----------
Refactor for concinnity

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/ihs_basicval.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2013-05-18 15:51:22 UTC (rev 5733)
+++ lmi/trunk/ChangeLog 2013-05-19 11:31:27 UTC (rev 5734)
@@ -32359,3 +32359,8 @@
   version.hpp
 Designate release candidate.
 
+20130519T1131Z <address@hidden> [541]
+
+  ihs_basicval.cpp
+Refactor for concinnity.
+

Modified: lmi/trunk/ihs_basicval.cpp
===================================================================
--- lmi/trunk/ihs_basicval.cpp  2013-05-18 15:51:22 UTC (rev 5733)
+++ lmi/trunk/ihs_basicval.cpp  2013-05-19 11:31:27 UTC (rev 5734)
@@ -1753,7 +1753,7 @@
             }
         case mce_noncompliant:
             {
-            Non7702CompliantCorridor = std::vector<double>(Length, 1.0);
+            Non7702CompliantCorridor = std::vector<double>(GetLength(), 1.0);
             return Non7702CompliantCorridor;
             }
         default:
@@ -1822,38 +1822,24 @@
 
 std::vector<double> BasicValues::GetCurrCOIRates1() const
 {
-    if(CurrCoiTable0Limit < std::numeric_limits<double>::max())
-        {
-        return GetTable
-            (ProductData_->datum("CurrCOIFilename")
-            ,DB_CurrCoiTable1
-            ,true
-            ,CanBlend
-            ,CanBlend
-            );
-        }
-    else
-        {
-        return std::vector<double>(Length);
-        }
+    return GetTable
+        (ProductData_->datum("CurrCOIFilename")
+        ,DB_CurrCoiTable1
+        ,CurrCoiTable0Limit < std::numeric_limits<double>::max()
+        ,CanBlend
+        ,CanBlend
+        );
 }
 
 std::vector<double> BasicValues::GetCurrCOIRates2() const
 {
-    if(CurrCoiTable1Limit < std::numeric_limits<double>::max())
-        {
-        return GetTable
-            (ProductData_->datum("CurrCOIFilename")
-            ,DB_CurrCoiTable2
-            ,true
-            ,CanBlend
-            ,CanBlend
-            );
-        }
-    else
-        {
-        return std::vector<double>(Length);
-        }
+    return GetTable
+        (ProductData_->datum("CurrCOIFilename")
+        ,DB_CurrCoiTable2
+        ,CurrCoiTable1Limit < std::numeric_limits<double>::max()
+        ,CanBlend
+        ,CanBlend
+        );
 }
 
 std::vector<double> BasicValues::GetGuarCOIRates() const
@@ -2019,27 +2005,19 @@
 
 std::vector<double> BasicValues::GetCurrSpecAmtLoadTable() const
 {
-    if(0 == Database_->Query(DB_CurrSpecAmtLoadTable))
-        {
-        return std::vector<double>(GetLength());
-        }
-
     return GetTable
         (ProductData_->datum("CurrSpecAmtLoadFilename")
         ,DB_CurrSpecAmtLoadTable
+        ,0 != Database_->Query(DB_CurrSpecAmtLoadTable)
         );
 }
 
 std::vector<double> BasicValues::GetGuarSpecAmtLoadTable() const
 {
-    if(0 == Database_->Query(DB_GuarSpecAmtLoadTable))
-        {
-        return std::vector<double>(GetLength());
-        }
-
     return GetTable
         (ProductData_->datum("GuarSpecAmtLoadFilename")
         ,DB_GuarSpecAmtLoadTable
+        ,0 != Database_->Query(DB_GuarSpecAmtLoadTable)
         );
 }
 




reply via email to

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