lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [6548] Fix defect introduced 20050114T1947Z


From: Greg Chicares
Subject: [lmi-commits] [6548] Fix defect introduced 20050114T1947Z
Date: Wed, 20 Apr 2016 00:17:23 +0000

Revision: 6548
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6548
Author:   chicares
Date:     2016-04-20 00:17:23 +0000 (Wed, 20 Apr 2016)
Log Message:
-----------
Fix defect introduced 20050114T1947Z

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

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2016-04-08 01:25:23 UTC (rev 6547)
+++ lmi/trunk/ChangeLog 2016-04-20 00:17:23 UTC (rev 6548)
@@ -38903,3 +38903,9 @@
   view_ex.hpp
 Refactor, eliminating protected virtuals.
 
+20160420T0017Z <address@hidden> [451]
+
+  ihs_basicval.cpp
+Fix defect introduced 20050114T1947Z, from an original file predating
+the lmi epoch: the string "Cust" does not begin with "Custom".
+

Modified: lmi/trunk/ihs_basicval.cpp
===================================================================
--- lmi/trunk/ihs_basicval.cpp  2016-04-08 01:25:23 UTC (rev 6547)
+++ lmi/trunk/ihs_basicval.cpp  2016-04-20 00:17:23 UTC (rev 6548)
@@ -58,7 +58,6 @@
 
 #include <algorithm>
 #include <cmath>                        // std::pow()
-#include <cstring>                      // std::strlen(), std::strncmp()
 #include <limits>
 #include <numeric>
 #include <stdexcept>
@@ -374,13 +373,7 @@
         // arithmetic mean is more reasonable than zero.
         if(yare_input_.UseAverageOfAllFunds || 0.0 == 
premium_allocation_to_sepacct(yare_input_))
             {
-            char const s[] = "Custom";
-            std::size_t n = std::strlen(s);
-            bool ignore = 0 == std::strncmp
-                (s
-                ,Funds.GetFundInfo(j).ShortName().c_str()
-                ,n
-                );
+            bool ignore = 0 == Funds.GetFundInfo(j).ShortName().find("custom");
             weight = ignore ? 0.0 : 1.0;
             }
         // If fund mgmt fee not overridden by average of all funds,




reply via email to

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