[mlpack-svn] r14102 - mlpack/trunk/src/mlpack/core/util

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu Jan 10 10:26:48 EST 2013


Author: rcurtin
Date: 2013-01-10 10:26:47 -0500 (Thu, 10 Jan 2013)
New Revision: 14102

Modified:
   mlpack/trunk/src/mlpack/core/util/string_util.cpp
   mlpack/trunk/src/mlpack/core/util/string_util.hpp
Log:
Clean up string util files (no functionality change).


Modified: mlpack/trunk/src/mlpack/core/util/string_util.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/util/string_util.cpp	2013-01-09 22:35:13 UTC (rev 14101)
+++ mlpack/trunk/src/mlpack/core/util/string_util.cpp	2013-01-10 15:26:47 UTC (rev 14102)
@@ -3,24 +3,23 @@
  *
  * Defines methods useful for formatting output.
  */
-
 #include "string_util.hpp"
 
-namespace mlpack {
-namespace util {
+using namespace mlpack;
+using namespace mlpack::util;
 
-// A utility function that replaces all all newlines with a number of spaces
-// depending on the indentation level.
+//! A utility function that replaces all all newlines with a number of spaces
+//! depending on the indentation level.
 std::string Indent(std::string input)
 {
-  // Tab the first line
+  // Tab the first line.
   input.insert(0, 1, ' ');
   input.insert(0, 1, ' ');
 
-  // Get the character sequence to replace all newline characters
+  // Get the character sequence to replace all newline characters.
   std::string tabbedNewline("\n  ");
 
-  // Replace all newline characters with the precomputed character sequence
+  // Replace all newline characters with the precomputed character sequence.
   size_t start_pos = 0;
   while((start_pos = input.find("\n", start_pos)) != std::string::npos) {
       input.replace(start_pos, 1, tabbedNewline);
@@ -29,5 +28,3 @@
 
   return input;
 }
-} // namespace util
-} // namespace mlpack

Modified: mlpack/trunk/src/mlpack/core/util/string_util.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/util/string_util.hpp	2013-01-09 22:35:13 UTC (rev 14101)
+++ mlpack/trunk/src/mlpack/core/util/string_util.hpp	2013-01-10 15:26:47 UTC (rev 14102)
@@ -11,10 +11,11 @@
 namespace mlpack {
 namespace util {
 
-// A utility function that replaces all all newlines with a number of spaces
-// depending on the indentation level.
+//! A utility function that replaces all all newlines with a number of spaces
+//! depending on the indentation level.
 std::string Indent(std::string input);
 
-}
-}
+}; // namespace util
+}; // namespace mlpack
+
 #endif




More information about the mlpack-svn mailing list