aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcharacter/llgesture.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llcharacter/llgesture.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llcharacter/llgesture.cpp')
-rw-r--r--linden/indra/llcharacter/llgesture.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/linden/indra/llcharacter/llgesture.cpp b/linden/indra/llcharacter/llgesture.cpp
index 60f0624..335e5c6 100644
--- a/linden/indra/llcharacter/llgesture.cpp
+++ b/linden/indra/llcharacter/llgesture.cpp
@@ -191,11 +191,11 @@ LLGestureList::LLGestureList()
191 mList.put(gesture); 191 mList.put(gesture);
192 192
193 gesture = new LLGesture(KEY_F4, MASK_NONE, "/boogie", 193 gesture = new LLGesture(KEY_F4, MASK_NONE, "/boogie",
194 LLUUID::null, "dance4", LLString::null ); 194 LLUUID::null, "dance4", LLStringUtil::null );
195 mList.put(gesture); 195 mList.put(gesture);
196 196
197 gesture = new LLGesture(KEY_F5, MASK_SHIFT, "/tongue", 197 gesture = new LLGesture(KEY_F5, MASK_SHIFT, "/tongue",
198 LLUUID::null, "Express_Tongue_Out", LLString::null ); 198 LLUUID::null, "Express_Tongue_Out", LLStringUtil::null );
199 mList.put(gesture); 199 mList.put(gesture);
200 */ 200 */
201} 201}
@@ -219,9 +219,9 @@ void LLGestureList::deleteAll()
219// Iterates through space delimited tokens in string, triggering any gestures found. 219// Iterates through space delimited tokens in string, triggering any gestures found.
220// Generates a revised string that has the found tokens replaced by their replacement strings 220// Generates a revised string that has the found tokens replaced by their replacement strings
221// and (as a minor side effect) has multiple spaces in a row replaced by single spaces. 221// and (as a minor side effect) has multiple spaces in a row replaced by single spaces.
222BOOL LLGestureList::triggerAndReviseString(const LLString &string, LLString* revised_string) 222BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::string* revised_string)
223{ 223{
224 LLString tokenized = string; 224 std::string tokenized = string;
225 225
226 BOOL found_gestures = FALSE; 226 BOOL found_gestures = FALSE;
227 BOOL first_token = TRUE; 227 BOOL first_token = TRUE;
@@ -237,8 +237,8 @@ BOOL LLGestureList::triggerAndReviseString(const LLString &string, LLString* rev
237 237
238 if( !found_gestures ) // Only pay attention to the first gesture in the string. 238 if( !found_gestures ) // Only pay attention to the first gesture in the string.
239 { 239 {
240 LLString cur_token_lower = *token_iter; 240 std::string cur_token_lower = *token_iter;
241 LLString::toLower(cur_token_lower); 241 LLStringUtil::toLower(cur_token_lower);
242 242
243 for (S32 i = 0; i < mList.count(); i++) 243 for (S32 i = 0; i < mList.count(); i++)
244 { 244 {
@@ -254,15 +254,15 @@ BOOL LLGestureList::triggerAndReviseString(const LLString &string, LLString* rev
254 254
255 // Don't muck with the user's capitalization if we don't have to. 255 // Don't muck with the user's capitalization if we don't have to.
256 const std::string& output = gesture->getOutputString(); 256 const std::string& output = gesture->getOutputString();
257 LLString output_lower = LLString(output.c_str()); 257 std::string output_lower = std::string(output.c_str());
258 LLString::toLower(output_lower); 258 LLStringUtil::toLower(output_lower);
259 if( cur_token_lower == output_lower ) 259 if( cur_token_lower == output_lower )
260 { 260 {
261 revised_string->append(*token_iter); 261 revised_string->append(*token_iter);
262 } 262 }
263 else 263 else
264 { 264 {
265 revised_string->append(output.c_str()); 265 revised_string->append(output);
266 } 266 }
267 267
268 } 268 }