Browse Source

adjacency_matrix: internal changes (coding style)

skypjack 1 month ago
parent
commit
e54add5eab
1 changed files with 3 additions and 7 deletions
  1. 3 7
      src/entt/graph/adjacency_matrix.hpp

+ 3 - 7
src/entt/graph/adjacency_matrix.hpp

@@ -63,8 +63,9 @@ public:
         return std::make_pair<size_type>(pos / vert, pos % vert);
     }
 
-    template<typename Type>
-    friend constexpr bool operator==(const edge_iterator<Type> &, const edge_iterator<Type> &) noexcept;
+    [[nodiscard]] constexpr bool operator==(const edge_iterator &other) const noexcept {
+        return pos == other.pos;
+    }
 
 private:
     It it{};
@@ -74,11 +75,6 @@ private:
     size_type offset{};
 };
 
-template<typename Container>
-[[nodiscard]] constexpr bool operator==(const edge_iterator<Container> &lhs, const edge_iterator<Container> &rhs) noexcept {
-    return lhs.pos == rhs.pos;
-}
-
 } // namespace internal
 /*! @endcond */