diff --git a/src/mlpack/methods/neighbor_search/neighbor_search.hpp b/src/mlpack/methods/neighbor_search/neighbor_search.hpp index aafc790568..d05ca1f70d 100644 --- a/src/mlpack/methods/neighbor_search/neighbor_search.hpp +++ b/src/mlpack/methods/neighbor_search/neighbor_search.hpp @@ -59,7 +59,7 @@ class QueryStat : bound(SortPolicy::WorstDistance()) { } //! Get the bound. - const double Bound() const { return bound; } + double Bound() const { return bound; } //! Modify the bound. double& Bound() { return bound; } }; diff --git a/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp b/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp index b7e16e4203..33c912e5dc 100644 --- a/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp +++ b/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp @@ -77,7 +77,7 @@ class FurthestNeighborSort * * @return 0 */ - static inline const double WorstDistance() { return 0; } + static inline double WorstDistance() { return 0; } /** * Return what should represent the best possible distance with this @@ -86,7 +86,7 @@ class FurthestNeighborSort * * @return DBL_MAX */ - static inline const double BestDistance() { return DBL_MAX; } + static inline double BestDistance() { return DBL_MAX; } }; }; // namespace neighbor diff --git a/src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort.hpp b/src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort.hpp index bd96a97b53..3c63368b07 100644 --- a/src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort.hpp +++ b/src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort.hpp @@ -81,7 +81,7 @@ class NearestNeighborSort * * @return DBL_MAX */ - static inline const double WorstDistance() { return DBL_MAX; } + static inline double WorstDistance() { return DBL_MAX; } /** * Return what should represent the best possible distance with this @@ -90,7 +90,7 @@ class NearestNeighborSort * * @return 0.0 */ - static inline const double BestDistance() { return 0.0; } + static inline double BestDistance() { return 0.0; } }; }; // namespace neighbor diff --git a/src/mlpack/tests/save_restore_utility_test.cpp b/src/mlpack/tests/save_restore_utility_test.cpp index 67f99a4a62..eea5df9ad8 100644 --- a/src/mlpack/tests/save_restore_utility_test.cpp +++ b/src/mlpack/tests/save_restore_utility_test.cpp @@ -45,7 +45,7 @@ class SaveRestoreTest return success; } - const size_t AnInt() { return anInt; } + size_t AnInt() { return anInt; } void AnInt(size_t s) { this->anInt = s; } };