mirror of
https://github.com/anope/anope.git
synced 2026-06-28 10:26:37 +02:00
Avoid NickAlias lookups by storing a pointer in the NickCore.
This commit is contained in:
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user