diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-06-06 11:21:01 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-06-06 11:21:01 +0200 |
| commit | d2ddcd7b36a93f76f11941e240d2907bdc414e53 (patch) | |
| tree | 202a54c01ac1fe667470f304fc92933e0495ea7d /src/server/game/Grids/Dynamic | |
| parent | f04cc7a8cb53f0d19b8fd24671333112cf5f3cf8 (diff) | |
Core/Grids: Remove unused template parameter from Grid class
Diffstat (limited to 'src/server/game/Grids/Dynamic')
| -rw-r--r-- | src/server/game/Grids/Dynamic/TypeContainer.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/game/Grids/Dynamic/TypeContainer.h b/src/server/game/Grids/Dynamic/TypeContainer.h index 78ed885d7b7..ff49e047415 100644 --- a/src/server/game/Grids/Dynamic/TypeContainer.h +++ b/src/server/game/Grids/Dynamic/TypeContainer.h @@ -65,14 +65,17 @@ struct TypeListContainer template <typename ObjectType> static constexpr bool TypeExists = std::disjunction_v<std::is_same<ObjectType, Types>...>; + template <typename ObjectType> + using ValueType = typename UnderlyingContainer<ObjectType>::ValueType; + template <typename ObjectType> requires TypeExists<ObjectType> - bool Insert(ObjectType* object) + bool Insert(ValueType<ObjectType> object) { return UnderlyingContainer<ObjectType>::Insert(Data.template FindContainer<ObjectType>(), object); } template <typename ObjectType> requires TypeExists<ObjectType> - bool Remove(ObjectType* object) + bool Remove(ValueType<ObjectType> object) { return UnderlyingContainer<ObjectType>::Remove(Data.template FindContainer<ObjectType>(), object); } @@ -84,7 +87,7 @@ struct TypeListContainer } template <typename ObjectType> requires TypeExists<ObjectType> && requires { typename UnderlyingContainer<ObjectType>::KeyType; } - ObjectType* Find(typename UnderlyingContainer<ObjectType>::KeyType const& key) const + ValueType<ObjectType> Find(typename UnderlyingContainer<ObjectType>::KeyType const& key) const { return UnderlyingContainer<ObjectType>::Find(Data.template FindContainer<ObjectType>(), key); } |
