diff options
-rw-r--r-- | compat/vector-wrapper-fwd.hpp | 6 | ||||
-rw-r--r-- | compat/vector-wrapper.hpp | 6 | ||||
-rw-r--r-- | src/chunk-region.cpp | 1 | ||||
-rw-r--r-- | src/search-result.cpp | 2 | ||||
-rw-r--r-- | src/search-result.hpp | 2 |
5 files changed, 8 insertions, 9 deletions
diff --git a/compat/vector-wrapper-fwd.hpp b/compat/vector-wrapper-fwd.hpp index bba24e4d..ae9c80b1 100644 --- a/compat/vector-wrapper-fwd.hpp +++ b/compat/vector-wrapper-fwd.hpp @@ -5,9 +5,9 @@ namespace floormat { enum class vector_wrapper_repr : uint8_t { invalid, - lvalue_reference_to_vector, - const_reference_to_vector, - vector, + ref, + const_ref, + value, }; template<typename T, vector_wrapper_repr> struct vector_wrapper; diff --git a/compat/vector-wrapper.hpp b/compat/vector-wrapper.hpp index 5bbb8677..b664c32b 100644 --- a/compat/vector-wrapper.hpp +++ b/compat/vector-wrapper.hpp @@ -6,9 +6,9 @@ namespace floormat { template<typename T, vector_wrapper_repr> struct vector_wrapper_traits; -template<typename T> struct vector_wrapper_traits<T, vector_wrapper_repr::lvalue_reference_to_vector> { using vector_type = std::vector<T>&; }; -template<typename T> struct vector_wrapper_traits<T, vector_wrapper_repr::const_reference_to_vector> { using vector_type = const std::vector<T>&; }; -template<typename T> struct vector_wrapper_traits<T, vector_wrapper_repr::vector> { using vector_type = std::vector<T>; }; +template<typename T> struct vector_wrapper_traits<T, vector_wrapper_repr::ref> { using vector_type = std::vector<T>&; }; +template<typename T> struct vector_wrapper_traits<T, vector_wrapper_repr::const_ref> { using vector_type = const std::vector<T>&; }; +template<typename T> struct vector_wrapper_traits<T, vector_wrapper_repr::value> { using vector_type = std::vector<T>; }; template<typename T, vector_wrapper_repr R> struct vector_wrapper final diff --git a/src/chunk-region.cpp b/src/chunk-region.cpp index 228b1052..c976fd28 100644 --- a/src/chunk-region.cpp +++ b/src/chunk-region.cpp @@ -14,7 +14,6 @@ namespace floormat { namespace { using Search::bbox; -using Search::div_factor; using Search::div_size; using Search::div_count; using Search::pred; diff --git a/src/search-result.cpp b/src/search-result.cpp index ba94b6f0..31f3887c 100644 --- a/src/search-result.cpp +++ b/src/search-result.cpp @@ -93,7 +93,7 @@ const point& path_search_result::operator[](size_t index) const fm_debug_assert(index < _node->vec.size()); return data()[index]; } -vector_wrapper<point, vector_wrapper_repr::lvalue_reference_to_vector> path_search_result::raw_path() { fm_assert(_node); return {_node->vec}; } +vector_wrapper<point, vector_wrapper_repr::ref> path_search_result::raw_path() { fm_assert(_node); return {_node->vec}; } ArrayView<const point> path_search_result::path() const { fm_assert(_node); return {_node->vec.data(), _node->vec.size()}; } } // namespace floormat diff --git a/src/search-result.hpp b/src/search-result.hpp index d29fdc44..257d25a3 100644 --- a/src/search-result.hpp +++ b/src/search-result.hpp @@ -24,7 +24,7 @@ struct path_search_result final uint32_t distance() const; void set_distance(uint32_t dist); - vector_wrapper<point, vector_wrapper_repr::lvalue_reference_to_vector> raw_path(); + vector_wrapper<point, vector_wrapper_repr::ref> raw_path(); ArrayView<const point> path() const; explicit operator ArrayView<const point>() const; explicit operator bool() const; |