diff --git a/indra/newview/llchatutilities.cpp b/indra/newview/llchatutilities.cpp index 763390cdb3e4cb6142f4d5cdaf2a7323b100d512..63f90907d0e43bec6b1eb8cce00df3a1ab564145 100644 --- a/indra/newview/llchatutilities.cpp +++ b/indra/newview/llchatutilities.cpp @@ -38,7 +38,7 @@ // legacy callback glue extern void send_chat_from_viewer(const std::string& utf8_out_text, EChatType type, S32 channel); -/* static */ std::unordered_map<std::string, EChatType> sChatTypeTriggers = { +const std::map<std::string, EChatType> sChatTypeTriggers = { {LLStringExplicit("/whisper"), CHAT_TYPE_WHISPER}, {LLStringExplicit("/shout"), CHAT_TYPE_SHOUT} }; @@ -115,7 +115,7 @@ EChatType LLChatUtilities::processChatTypeTriggers(EChatType type, std::string & if (!LLStringUtil::compareInsensitive(trigger, ti.first)) { - U32 trigger_length = ti.first.length(); + size_t trigger_length = ti.first.length(); // It's to remove space after trigger name if (length > trigger_length && str[trigger_length] == ' ') diff --git a/indra/newview/llchatutilities.h b/indra/newview/llchatutilities.h index cc1e0fcd732ff96807bcb5f89de6c42b8fdbfb30..0196ddc28abab13bc6658c545a23ab8bcd63a83b 100644 --- a/indra/newview/llchatutilities.h +++ b/indra/newview/llchatutilities.h @@ -27,12 +27,9 @@ #define LL_CHATUTILITIES_H #include "llchat.h" -#include <unordered_map> namespace LLChatUtilities { - static std::unordered_map<std::string, EChatType> sChatTypeTriggers; - // Send a chat (after stripping /20foo channel chats). // "Animate" means the nodding animation for regular text. void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);