[mlpack-git] master: Replace DEPRECATED by mlpack_deprecated. (14cf05c)

gitdub at mlpack.org gitdub at mlpack.org
Tue Aug 23 15:58:25 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/1148f1652e139c9037eb3813550090313d089a30...a8a8a1381b529a01420de6e792a4a1e7bd58a626

>---------------------------------------------------------------

commit 14cf05c5838d732adac243b0952f648375428497
Author: MarcosPividori <marcos.pividori at gmail.com>
Date:   Fri Aug 19 11:25:10 2016 -0300

    Replace DEPRECATED by mlpack_deprecated.


>---------------------------------------------------------------

14cf05c5838d732adac243b0952f648375428497
 src/mlpack/core/util/deprecated.hpp                   | 11 ++++++-----
 .../methods/neighbor_search/neighbor_search.hpp       | 19 ++++++++++---------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/mlpack/core/util/deprecated.hpp b/src/mlpack/core/util/deprecated.hpp
index ce31acc..f98d516 100644
--- a/src/mlpack/core/util/deprecated.hpp
+++ b/src/mlpack/core/util/deprecated.hpp
@@ -2,18 +2,19 @@
  * @file deprecated.hpp
  * @author Marcos Pividori.
  *
- * Definition of the DEPRECATED macro.
+ * Definition of the mlpack_deprecated macro.
  */
 #ifndef MLPACK_CORE_UTIL_DEPRECATED_HPP
 #define MLPACK_CORE_UTIL_DEPRECATED_HPP
 
 #ifdef __GNUG__
-#define DEPRECATED __attribute__((deprecated))
+#define mlpack_deprecated __attribute__((deprecated))
 #elif defined(_MSC_VER)
-#define DEPRECATED __declspec(deprecated)
+#define mlpack_deprecated __declspec(deprecated)
 #else
-#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
-#define DEPRECATED
+#pragma message("WARNING: You need to implement mlpack_deprecated for this "
+    "compiler")
+#define mlpack_deprecated
 #endif
 
 #endif
diff --git a/src/mlpack/methods/neighbor_search/neighbor_search.hpp b/src/mlpack/methods/neighbor_search/neighbor_search.hpp
index 5f7f275..b66678e 100644
--- a/src/mlpack/methods/neighbor_search/neighbor_search.hpp
+++ b/src/mlpack/methods/neighbor_search/neighbor_search.hpp
@@ -153,10 +153,11 @@ class NeighborSearch
    * @param epsilon Relative approximate error (non-negative).
    * @param metric Instantiated distance metric.
    */
-  DEPRECATED NeighborSearch(Tree* referenceTree,
-                            const NeighborSearchMode mode = DUAL_TREE_MODE,
-                            const double epsilon = 0,
-                            const MetricType metric = MetricType());
+  mlpack_deprecated NeighborSearch(
+      Tree* referenceTree,
+      const NeighborSearchMode mode = DUAL_TREE_MODE,
+      const double epsilon = 0,
+      const MetricType metric = MetricType());
 
   /**
    * Create a NeighborSearch object without any reference data.  If Search() is
@@ -284,10 +285,10 @@ class NeighborSearch
    * @param epsilon Relative approximate error (non-negative).
    * @param metric Instantiated distance metric.
    */
-  DEPRECATED NeighborSearch(Tree* referenceTree,
-                            const bool singleMode,
-                            const double epsilon = 0,
-                            const MetricType metric = MetricType());
+  mlpack_deprecated NeighborSearch(Tree* referenceTree,
+                                   const bool singleMode,
+                                   const double epsilon = 0,
+                                   const MetricType metric = MetricType());
 
   /**
    * Initialize the NeighborSearch object with the given pre-constructed
@@ -372,7 +373,7 @@ class NeighborSearch
    *
    * @param referenceTree Pre-built tree for reference points.
    */
-  DEPRECATED void Train(Tree* referenceTree);
+  mlpack_deprecated void Train(Tree* referenceTree);
 
   /**
    * Set the reference tree as a copy of the given reference tree.




More information about the mlpack-git mailing list