File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ ElunaMgr::~ElunaMgr()
2424void ElunaMgr::Create (Map* map, ElunaInfo const & info)
2525{
2626 // If already exists, do nothing
27- bool keyExists = ( info.key != ElunaInfo::INVALID_KEY_ID ) && (_elunaMap.find (info.key ) != _elunaMap.end ());
27+ bool keyExists = info.IsValid ( ) && (_elunaMap.find (info.key ) != _elunaMap.end ());
2828 if (keyExists)
2929 return ;
3030
@@ -66,12 +66,12 @@ ElunaInfo::~ElunaInfo()
6666 sElunaMgr ->Destroy (key);
6767}
6868
69- uint64 ElunaInfo::MakeKey (uint32 mapId, uint32 instanceId)
69+ constexpr uint64 ElunaInfo::MakeKey (uint32 mapId, uint32 instanceId)
7070{
7171 return instanceId | (static_cast <uint64>(mapId) << 32 );
7272}
7373
74- uint64 ElunaInfo::MakeGlobalKey (uint32 instanceId)
74+ constexpr uint64 ElunaInfo::MakeGlobalKey (uint32 instanceId)
7575{
7676 return MakeKey (GLOBAL_MAP_ID, instanceId);
7777}
@@ -80,6 +80,7 @@ bool ElunaInfo::IsValid() const
8080{
8181 return key != INVALID_KEY_ID;
8282}
83+
8384bool ElunaInfo::IsGlobal () const
8485{
8586 return IsValid () && GetMapId () == GLOBAL_MAP_ID;
You can’t perform that action at this time.
0 commit comments