lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [4986] Rearrange to make an imminent refactoring clearer


From: Greg Chicares
Subject: [lmi-commits] [4986] Rearrange to make an imminent refactoring clearer
Date: Sat, 12 Jun 2010 01:17:31 +0000

Revision: 4986
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=4986
Author:   chicares
Date:     2010-06-12 01:17:30 +0000 (Sat, 12 Jun 2010)
Log Message:
-----------
Rearrange to make an imminent refactoring clearer

Modified Paths:
--------------
    lmi/trunk/configurable_settings.cpp

Modified: lmi/trunk/configurable_settings.cpp
===================================================================
--- lmi/trunk/configurable_settings.cpp 2010-06-11 23:56:54 UTC (rev 4985)
+++ lmi/trunk/configurable_settings.cpp 2010-06-12 01:17:30 UTC (rev 4986)
@@ -49,6 +49,10 @@
 
 namespace
 {
+// Forward declarations that will soon become unnecessary.
+std::string const& xml_root_name();
+bool is_detritus(std::string const&);
+
 std::string const& configuration_filename()
 {
     static std::string s("configurable_settings.xml");
@@ -103,30 +107,6 @@
         );
     return s;
 }
-
-/// Entities that were present in older versions and then removed
-/// are recognized and ignored. If they're resurrected in a later
-/// version, then they aren't ignored.
-
-bool is_detritus(std::string const& s)
-{
-    static std::string const a[] =
-        {"xml_schema_filename"               // Withdrawn.
-        ,"xsl_directory"                     // Withdrawn.
-        ,"xslt_format_xml_filename"          // Withdrawn.
-        ,"xslt_html_filename"                // Withdrawn.
-        ,"xslt_light_tab_delimited_filename" // Withdrawn.
-        ,"xslt_tab_delimited_filename"       // Withdrawn.
-        };
-    static std::vector<std::string> const v(a, a + lmi_array_size(a));
-    return contains(v, s);
-}
-
-std::string const& xml_root_name()
-{
-    static std::string const s("configurable_settings");
-    return s;
-}
 } // Unnamed namespace.
 
 configurable_settings::configurable_settings()
@@ -262,6 +242,33 @@
         }
 }
 
+namespace
+{
+std::string const& xml_root_name()
+{
+    static std::string const s("configurable_settings");
+    return s;
+}
+
+/// Entities that were present in older versions and then removed
+/// are recognized and ignored. If they're resurrected in a later
+/// version, then they aren't ignored.
+
+bool is_detritus(std::string const& s)
+{
+    static std::string const a[] =
+        {"xml_schema_filename"               // Withdrawn.
+        ,"xsl_directory"                     // Withdrawn.
+        ,"xslt_format_xml_filename"          // Withdrawn.
+        ,"xslt_html_filename"                // Withdrawn.
+        ,"xslt_light_tab_delimited_filename" // Withdrawn.
+        ,"xslt_tab_delimited_filename"       // Withdrawn.
+        };
+    static std::vector<std::string> const v(a, a + lmi_array_size(a));
+    return contains(v, s);
+}
+} // Unnamed namespace.
+
 // TODO ?? CALCULATION_SUMMARY Address the validation issue:
 
 /// A whitespace-delimited list of columns to be shown on the




reply via email to

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