소스 검색

sparse_set: no need to differentiate template args for sparse_set_iterator

Michele Caini 3 년 전
부모
커밋
dd9c1dade8
1개의 변경된 파일14개의 추가작업 그리고 14개의 파일을 삭제
  1. 14 14
      src/entt/entity/sparse_set.hpp

+ 14 - 14
src/entt/entity/sparse_set.hpp

@@ -97,38 +97,38 @@ private:
     difference_type offset;
     difference_type offset;
 };
 };
 
 
-template<typename Type, typename Other>
-[[nodiscard]] constexpr std::ptrdiff_t operator-(const sparse_set_iterator<Type> &lhs, const sparse_set_iterator<Other> &rhs) noexcept {
+template<typename Container>
+[[nodiscard]] constexpr std::ptrdiff_t operator-(const sparse_set_iterator<Container> &lhs, const sparse_set_iterator<Container> &rhs) noexcept {
     return rhs.index() - lhs.index();
     return rhs.index() - lhs.index();
 }
 }
 
 
-template<typename Type, typename Other>
-[[nodiscard]] constexpr bool operator==(const sparse_set_iterator<Type> &lhs, const sparse_set_iterator<Other> &rhs) noexcept {
+template<typename Container>
+[[nodiscard]] constexpr bool operator==(const sparse_set_iterator<Container> &lhs, const sparse_set_iterator<Container> &rhs) noexcept {
     return lhs.index() == rhs.index();
     return lhs.index() == rhs.index();
 }
 }
 
 
-template<typename Type, typename Other>
-[[nodiscard]] constexpr bool operator!=(const sparse_set_iterator<Type> &lhs, const sparse_set_iterator<Other> &rhs) noexcept {
+template<typename Container>
+[[nodiscard]] constexpr bool operator!=(const sparse_set_iterator<Container> &lhs, const sparse_set_iterator<Container> &rhs) noexcept {
     return !(lhs == rhs);
     return !(lhs == rhs);
 }
 }
 
 
-template<typename Type, typename Other>
-[[nodiscard]] constexpr bool operator<(const sparse_set_iterator<Type> &lhs, const sparse_set_iterator<Other> &rhs) noexcept {
+template<typename Container>
+[[nodiscard]] constexpr bool operator<(const sparse_set_iterator<Container> &lhs, const sparse_set_iterator<Container> &rhs) noexcept {
     return lhs.index() > rhs.index();
     return lhs.index() > rhs.index();
 }
 }
 
 
-template<typename Type, typename Other>
-[[nodiscard]] constexpr bool operator>(const sparse_set_iterator<Type> &lhs, const sparse_set_iterator<Other> &rhs) noexcept {
+template<typename Container>
+[[nodiscard]] constexpr bool operator>(const sparse_set_iterator<Container> &lhs, const sparse_set_iterator<Container> &rhs) noexcept {
     return lhs.index() < rhs.index();
     return lhs.index() < rhs.index();
 }
 }
 
 
-template<typename Type, typename Other>
-[[nodiscard]] constexpr bool operator<=(const sparse_set_iterator<Type> &lhs, const sparse_set_iterator<Other> &rhs) noexcept {
+template<typename Container>
+[[nodiscard]] constexpr bool operator<=(const sparse_set_iterator<Container> &lhs, const sparse_set_iterator<Container> &rhs) noexcept {
     return !(lhs > rhs);
     return !(lhs > rhs);
 }
 }
 
 
-template<typename Type, typename Other>
-[[nodiscard]] constexpr bool operator>=(const sparse_set_iterator<Type> &lhs, const sparse_set_iterator<Other> &rhs) noexcept {
+template<typename Container>
+[[nodiscard]] constexpr bool operator>=(const sparse_set_iterator<Container> &lhs, const sparse_set_iterator<Container> &rhs) noexcept {
     return !(lhs < rhs);
     return !(lhs < rhs);
 }
 }