From d5b0f0b3db55e5d2d9544f783931653f31dc28a1 Mon Sep 17 00:00:00 2001
From: Cinder <cinder@sdf.org>
Date: Sun, 3 Jan 2016 19:38:27 -0700
Subject: [PATCH] Fix chat triggers

---
 indra/newview/llchatutilities.cpp | 4 ++--
 indra/newview/llchatutilities.h   | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/indra/newview/llchatutilities.cpp b/indra/newview/llchatutilities.cpp
index 763390cdb3..63f90907d0 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 cc1e0fcd73..0196ddc28a 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);
-- 
GitLab