aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Cache/CharacterCache.cpp
diff options
context:
space:
mode:
authorUjp8LfXBJ6wCPR <github@lillecarl.com>2020-02-08 20:29:18 +0100
committerGitHub <noreply@github.com>2020-02-08 20:29:18 +0100
commit76831f1f467efe4aa26a38dc58c9eab2229bce71 (patch)
treef8b0090795ab5ccb4ac6546799a1f56ba302d97b /src/server/game/Cache/CharacterCache.cpp
parentc574972cb2d000caacd155ddd32af425bed259ee (diff)
Use boost::optional and boost::none instead of smelly pointer (#24134)
* Remove bad pointer usage from CharacterCache Use TrinityCore Option type instead which is intended for this purpose. (Wrapper around boost::option until C++17 bump is finalised) * Unify codestyle regarding TC optional type Based upon advice from @Shauren
Diffstat (limited to 'src/server/game/Cache/CharacterCache.cpp')
-rw-r--r--src/server/game/Cache/CharacterCache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Cache/CharacterCache.cpp b/src/server/game/Cache/CharacterCache.cpp
index b5be0e8c2b4..1835571b1e5 100644
--- a/src/server/game/Cache/CharacterCache.cpp
+++ b/src/server/game/Cache/CharacterCache.cpp
@@ -116,7 +116,7 @@ void CharacterCache::DeleteCharacterCacheEntry(ObjectGuid const& guid, std::stri
_characterCacheByNameStore.erase(name);
}
-void CharacterCache::UpdateCharacterData(ObjectGuid const& guid, std::string const& name, uint8* gender /*= nullptr*/, uint8* race /*= nullptr*/)
+void CharacterCache::UpdateCharacterData(ObjectGuid const& guid, std::string const& name, Optional<uint8> gender /*= {}*/, Optional<uint8> race /*= {}*/)
{
auto itr = _characterCacheStore.find(guid);
if (itr == _characterCacheStore.end())