summaryrefslogtreecommitdiff
path: root/indra/llcharacter/llgesture.cpp
diff options
context:
space:
mode:
authorFawrsk <fawrsk@gmail.com>2023-01-05 07:42:27 -0400
committerGitHub <noreply@github.com>2023-01-05 13:42:27 +0200
commitd0f115ae093e8268da2a3245d6cb2f3bcc544f1c (patch)
treea85ec8f19e1ceceee819a9dd70d3effddb1be677 /indra/llcharacter/llgesture.cpp
parentbdfb47cc6bd6af77ec7cd4c04f83606c222ac437 (diff)
SL-18893 Cleanup for loops in llcharacter to use C++11 range based for loops (#42)
Diffstat (limited to 'indra/llcharacter/llgesture.cpp')
-rw-r--r--indra/llcharacter/llgesture.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/llcharacter/llgesture.cpp b/indra/llcharacter/llgesture.cpp
index 37904936d8..e9a4475707 100644
--- a/indra/llcharacter/llgesture.cpp
+++ b/indra/llcharacter/llgesture.cpp
@@ -199,15 +199,14 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep(" ");
tokenizer tokens(string, sep);
- tokenizer::iterator token_iter;
- for( token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
+ for(std::string cur_token : tokens)
{
LLGesture* gesture = NULL;
if( !found_gestures ) // Only pay attention to the first gesture in the string.
{
- std::string cur_token_lower = *token_iter;
+ std::string cur_token_lower = cur_token;
LLStringUtil::toLower(cur_token_lower);
for (U32 i = 0; i < mList.size(); i++)
@@ -228,7 +227,7 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
LLStringUtil::toLower(output_lower);
if( cur_token_lower == output_lower )
{
- revised_string->append(*token_iter);
+ revised_string->append(cur_token);
}
else
{
@@ -249,7 +248,7 @@ BOOL LLGestureList::triggerAndReviseString(const std::string &string, std::strin
{
revised_string->append( " " );
}
- revised_string->append( *token_iter );
+ revised_string->append( cur_token );
}
first_token = FALSE;