diff options
Diffstat (limited to 'linden/indra/llmessage/message.h')
-rw-r--r-- | linden/indra/llmessage/message.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h index 05aa592..00abff4 100644 --- a/linden/indra/llmessage/message.h +++ b/linden/indra/llmessage/message.h | |||
@@ -68,7 +68,7 @@ const U32 MESSAGE_NUMBER_OF_HASH_BUCKETS = 8192; | |||
68 | 68 | ||
69 | const S32 MESSAGE_MAX_PER_FRAME = 400; | 69 | const S32 MESSAGE_MAX_PER_FRAME = 400; |
70 | 70 | ||
71 | class LLMessageStringTable | 71 | class LLMessageStringTable : public LLSingleton<LLMessageStringTable> |
72 | { | 72 | { |
73 | public: | 73 | public: |
74 | LLMessageStringTable(); | 74 | LLMessageStringTable(); |
@@ -81,7 +81,6 @@ public: | |||
81 | char mString[MESSAGE_NUMBER_OF_HASH_BUCKETS][MESSAGE_MAX_STRINGS_LENGTH]; /* Flawfinder: ignore */ | 81 | char mString[MESSAGE_NUMBER_OF_HASH_BUCKETS][MESSAGE_MAX_STRINGS_LENGTH]; /* Flawfinder: ignore */ |
82 | }; | 82 | }; |
83 | 83 | ||
84 | extern LLMessageStringTable gMessageStringTable; | ||
85 | 84 | ||
86 | // Individual Messages are described with the following format | 85 | // Individual Messages are described with the following format |
87 | // Note that to ease parsing, keywords are used | 86 | // Note that to ease parsing, keywords are used |
@@ -302,7 +301,7 @@ public: | |||
302 | void setHandlerFuncFast(const char *name, void (*handler_func)(LLMessageSystem *msgsystem, void **user_data), void **user_data = NULL); | 301 | void setHandlerFuncFast(const char *name, void (*handler_func)(LLMessageSystem *msgsystem, void **user_data), void **user_data = NULL); |
303 | void setHandlerFunc(const char *name, void (*handler_func)(LLMessageSystem *msgsystem, void **user_data), void **user_data = NULL) | 302 | void setHandlerFunc(const char *name, void (*handler_func)(LLMessageSystem *msgsystem, void **user_data), void **user_data = NULL) |
304 | { | 303 | { |
305 | setHandlerFuncFast(gMessageStringTable.getString(name), handler_func, user_data); | 304 | setHandlerFuncFast(LLMessageStringTable::getInstance()->getString(name), handler_func, user_data); |
306 | } | 305 | } |
307 | 306 | ||
308 | // Set a callback function for a message system exception. | 307 | // Set a callback function for a message system exception. |
@@ -339,7 +338,7 @@ public: | |||
339 | BOOL isMessageFast(const char *msg); | 338 | BOOL isMessageFast(const char *msg); |
340 | BOOL isMessage(const char *msg) | 339 | BOOL isMessage(const char *msg) |
341 | { | 340 | { |
342 | return isMessageFast(gMessageStringTable.getString(msg)); | 341 | return isMessageFast(LLMessageStringTable::getInstance()->getString(msg)); |
343 | } | 342 | } |
344 | 343 | ||
345 | void dumpPacketToLog(); | 344 | void dumpPacketToLog(); |
@@ -372,7 +371,7 @@ public: | |||
372 | void nextBlockFast(const char *blockname); | 371 | void nextBlockFast(const char *blockname); |
373 | void nextBlock(const char *blockname) | 372 | void nextBlock(const char *blockname) |
374 | { | 373 | { |
375 | nextBlockFast(gMessageStringTable.getString(blockname)); | 374 | nextBlockFast(LLMessageStringTable::getInstance()->getString(blockname)); |
376 | } | 375 | } |
377 | 376 | ||
378 | public: | 377 | public: |