[mlpack] 142/207: fix bug--infinite recursive call

Barak A. Pearlmutter barak+git at pearlmutter.net
Thu Mar 23 17:53:48 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 eafbf338972903880ad68424072629e9943cf1d9
Author: stereomatchingkiss <stereomatchingkiss at gmail.com>
Date:   Sat Jun 4 20:34:31 2016 +0800

    fix bug--infinite recursive call
---
 src/mlpack/core/data/dataset_info.hpp      | 6 +++---
 src/mlpack/core/data/dataset_info_impl.hpp | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mlpack/core/data/dataset_info.hpp b/src/mlpack/core/data/dataset_info.hpp
index 7406b45..29663f1 100644
--- a/src/mlpack/core/data/dataset_info.hpp
+++ b/src/mlpack/core/data/dataset_info.hpp
@@ -56,12 +56,12 @@ class DatasetInfo
    */  
   size_t MapString(const std::string &string, const size_t dimension)
   {
-    return MapString(string, dimension);
+    return MapStringImpl(string, dimension);
   }
 
   size_t MapString(std::string &&string, const size_t dimension)
   {
-    return MapString(std::move(string), dimension);
+    return MapStringImpl(std::move(string), dimension);
   }
 
   /**
@@ -113,7 +113,7 @@ class DatasetInfo
       size_t>> maps;
 
   template<typename T>
-  size_t MapString(T&& string, const size_t dimension);
+  size_t MapStringImpl(T&& string, const size_t dimension);
 };
 
 } // namespace data
diff --git a/src/mlpack/core/data/dataset_info_impl.hpp b/src/mlpack/core/data/dataset_info_impl.hpp
index ed20f06..dbcd57f 100644
--- a/src/mlpack/core/data/dataset_info_impl.hpp
+++ b/src/mlpack/core/data/dataset_info_impl.hpp
@@ -22,8 +22,8 @@ inline DatasetInfo::DatasetInfo(const size_t dimensionality) :
 
 // Map the string to a numeric id.
 template<typename T>
-inline size_t DatasetInfo::MapString(T&& string,
-                                     const size_t dimension)
+inline size_t DatasetInfo::MapStringImpl(T&& string,
+                                         const size_t dimension)
 {
   // If this condition is true, either we have no mapping for the given string
   // or we have no mappings for the given dimension at all.  In either case,

-- 
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