Small optimization for message processing

Avoid creating the map for every message
This commit is contained in:
Alexey Sokolov
2024-10-15 11:42:15 +01:00
parent 9dcd44a15f
commit b536d0f3c3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -378,7 +378,7 @@ bool CIRCSock::OnCapabilityMessage(CMessage& Message) {
sArgs = Message.GetParam(2);
}
std::map<CString, std::function<void(bool bVal)>> mSupportedCaps = {
static std::map<CString, std::function<void(bool bVal)>> mSupportedCaps = {
{"multi-prefix", [this](bool bVal) { m_bNamesx = bVal; }},
{"userhost-in-names", [this](bool bVal) { m_bUHNames = bVal; }},
{"cap-notify", [](bool bVal) {}},