[mlpack] 159/207: simnplify parser and refine format

Barak A. Pearlmutter barak+git at pearlmutter.net
Thu Mar 23 17:53:50 UTC 2017


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch master
in repository mlpack.

commit d2fceb52edd5437b9b0aec39b7330136bf4e1af1
Author: stereomatchingkiss <stereomatchingkiss at gmail.com>
Date:   Tue Jun 7 13:51:24 2016 +0800

    simnplify parser and refine format
---
 src/mlpack/core/data/load_csv.hpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mlpack/core/data/load_csv.hpp b/src/mlpack/core/data/load_csv.hpp
index 0a23a97..c80fee0 100644
--- a/src/mlpack/core/data/load_csv.hpp
+++ b/src/mlpack/core/data/load_csv.hpp
@@ -87,7 +87,7 @@ public:
 
     //qi::raw restrict the automatic conversion of boost::spirit, without it, spirit parser
     //will try to convert the string to std::string, this may cause memory allocation(if small string
-  //optimization fail).
+    //optimization fail).
     //After we wrap the parser with qi::raw, the attribute(the data accepted by functor) will
     //become boost::iterator_range, this could save a tons of memory allocations
     qi::parse(begin, end, qi::raw[*~qi::char_(",\r\n")][findColSize] % ",");
@@ -338,11 +338,11 @@ private:
 
     if(extension == "csv" || extension == "txt")
     {
-      return qi::raw[*~qi::char_(" ,\r\n")];
+      return qi::raw[*~qi::char_(",\r\n")];
     }
     else
     {
-      return qi::raw[*~qi::char_(" \t\r\n")];
+      return qi::raw[*~qi::char_("\t\r\n")];
     }
   }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list