lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [5470] Fix 'make check_concinnity' issues in files just ad


From: Greg Chicares
Subject: [lmi-commits] [5470] Fix 'make check_concinnity' issues in files just added
Date: Sun, 27 May 2012 16:36:25 +0000

Revision: 5470
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5470
Author:   chicares
Date:     2012-05-27 16:36:25 +0000 (Sun, 27 May 2012)
Log Message:
-----------
Fix 'make check_concinnity' issues in files just added

Modified Paths:
--------------
    lmi/trunk/soa2xml.cpp
    lmi/trunk/soa_helpers.hpp
    lmi/trunk/soa_stress_test.cpp

Modified: lmi/trunk/soa2xml.cpp
===================================================================
--- lmi/trunk/soa2xml.cpp       2012-05-27 16:16:10 UTC (rev 5469)
+++ lmi/trunk/soa2xml.cpp       2012-05-27 16:36:25 UTC (rev 5470)
@@ -1,4 +1,31 @@
+// Convert SOA tables to xml.
+//
+// Copyright (C) 2012 Gregory W. Chicares.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// http://savannah.nongnu.org/projects/lmi
+// email: <address@hidden>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
 
+// $Id$
+
+#ifdef __BORLANDC__
+#   include "pchfile.hpp"
+#   pragma hdrstop
+#endif // __BORLANDC__
+
 #include "soa_helpers.hpp"
 
 #include "actuarial_table.hpp"
@@ -16,14 +43,13 @@
  ************************************************************************/
 
 template<typename T>
-inline const char *as_str(T x)
+inline char const* as_str(T x)
 {
     static std::string tmp;
     tmp = value_cast<std::string>(x);
     return tmp.c_str();
 }
 
-
 /************************************************************************
  conversion code
  ************************************************************************/
@@ -106,7 +132,6 @@
     return n;
 }
 
-
 void export_single_table(char const* filename, int index, char const* 
description)
 {
     fs::path table_path(filename);
@@ -151,7 +176,7 @@
 
 void export_soa_file(char const* filename)
 {
-    const std::vector<soa_record_info> tables = list_soa_file_tables(filename);
+    std::vector<soa_record_info> const tables = list_soa_file_tables(filename);
 
     for(std::vector<soa_record_info>::const_iterator i = tables.begin()
         ;i != tables.end()
@@ -161,20 +186,20 @@
         }
 }
 
-
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
 {
     try
-    {
+        {
         for(int i = 1; i < argc; i++)
             {
             export_soa_file(argv[i]);
             }
         return 0;
-    }
-    catch ( const std::exception& e )
-    {
+        }
+    catch(std::exception const& e)
+        {
         std::cerr << "Error: " << e.what() << std::endl;
         return 1;
-    }
+        }
 }
+

Modified: lmi/trunk/soa_helpers.hpp
===================================================================
--- lmi/trunk/soa_helpers.hpp   2012-05-27 16:16:10 UTC (rev 5469)
+++ lmi/trunk/soa_helpers.hpp   2012-05-27 16:36:25 UTC (rev 5470)
@@ -1,4 +1,31 @@
+// Auxiliary routines for tables in deprecated SOA format.
+//
+// Copyright (C) 2012 Gregory W. Chicares.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// http://savannah.nongnu.org/projects/lmi
+// email: <address@hidden>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
 
+// $Id$
+
+#ifndef soa_helpers_hpp
+#define soa_helpers_hpp
+
+#include "config.hpp"
+
 #include "actuarial_table.hpp"
 #include "miscellany.hpp"
 #include "path_utility.hpp" // fs::path inserter
@@ -16,12 +43,11 @@
  misc helpers
  ************************************************************************/
 
-inline void error(const boost::format& fmt)
+inline void error(boost::format const& fmt)
 {
     throw std::runtime_error(fmt.str());
 }
 
-
 /************************************************************************
  SOA actuarial table format helpers
  ************************************************************************/
@@ -32,7 +58,7 @@
     std::string name;
 };
 
-std::vector<soa_record_info> list_soa_file_tables(const char *filename)
+std::vector<soa_record_info> list_soa_file_tables(char const* filename)
 {
     std::vector<soa_record_info> v;
 
@@ -85,3 +111,5 @@
     return v;
 }
 
+#endif // soa_helpers_hpp
+

Modified: lmi/trunk/soa_stress_test.cpp
===================================================================
--- lmi/trunk/soa_stress_test.cpp       2012-05-27 16:16:10 UTC (rev 5469)
+++ lmi/trunk/soa_stress_test.cpp       2012-05-27 16:36:25 UTC (rev 5470)
@@ -1,4 +1,31 @@
+// Test SOA tables against xml equivalents.
+//
+// Copyright (C) 2012 Gregory W. Chicares.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// http://savannah.nongnu.org/projects/lmi
+// email: <address@hidden>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
 
+// $Id$
+
+#ifdef __BORLANDC__
+#   include "pchfile.hpp"
+#   pragma hdrstop
+#endif // __BORLANDC__
+
 #include "soa_helpers.hpp"
 
 #include "actuarial_table.hpp"
@@ -54,7 +81,6 @@
     throw std::runtime_error("XML table data are incorrect");
 }
 
-
 void test_single_table(char const* filename, int index)
 {
     soa_actuarial_table soa(filename, index);
@@ -88,10 +114,9 @@
         }
 }
 
-
 void stress_test(char const* filename)
 {
-    const std::vector<soa_record_info> tables = list_soa_file_tables(filename);
+    std::vector<soa_record_info> const tables = list_soa_file_tables(filename);
 
     for(std::vector<soa_record_info>::const_iterator i = tables.begin()
         ;i != tables.end()
@@ -112,20 +137,20 @@
         }
 }
 
-
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
 {
     try
-    {
+        {
         for(int i = 1; i < argc; i++)
             {
             stress_test(argv[i]);
             }
         return 0;
-    }
-    catch ( const std::exception& e )
-    {
+        }
+    catch(std::exception const& e)
+        {
         std::cerr << "Error:" << std::endl << e.what() << std::endl;
         return 1;
-    }
+        }
 }
+




reply via email to

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