diff options
author | Sadie Powell <sadie@witchery.services> | 2024-06-03 15:51:29 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-06-03 16:04:53 +0100 |
commit | e71a9e289441fd78ffa1bd3d8c20ea2cb8542426 (patch) | |
tree | 95def1c721754ed095e2ca9654892343f611a953 /src/nickcore.cpp | |
parent | f80bdf06bace6d3e5c50ed982fe1c14451ae4518 (diff) |
Avoid NickAlias lookups by storing a pointer in the NickCore.
Diffstat (limited to 'src/nickcore.cpp')
-rw-r--r-- | src/nickcore.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nickcore.cpp b/src/nickcore.cpp index 64aa4f504..0fa721f8d 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -149,7 +149,7 @@ Serializable *NickCore::Unserialize(Serializable *obj, Serialize::Data &data) return nc; } -void NickCore::SetDisplay(const NickAlias *na) +void NickCore::SetDisplay(NickAlias *na) { if (na->nc != this || na->nick == this->display) return; @@ -164,6 +164,7 @@ void NickCore::SetDisplay(const NickAlias *na) NickCoreList->erase(this->display); this->display = na->nick; + this->na = na; (*NickCoreList)[this->display] = this; } |