aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Grids/Dynamic
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Grids/Dynamic')
-rw-r--r--src/server/game/Grids/Dynamic/TypeContainer.h9
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);
}