diff options
author | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-01-10 11:38:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 11:38:34 +0200 |
commit | 9c250f1a9ee2e49505a35513cb88de54e2694e6c (patch) | |
tree | 26c8c15b117bc183386af1ee6e8b6617708aeba7 /indra/llcommon/llstring.h | |
parent | d0f115ae093e8268da2a3245d6cb2f3bcc544f1c (diff) | |
parent | 8767e6995b0c9b9ed23e07f63d290a1da8c70f17 (diff) |
SL-18893 Cleanup for loops in llcommon to use C++11 range based for loops (#44)
* Cleanup for loops in llcommon to use C++11 range based for loops
* Eliminate needless copies
Diffstat (limited to 'indra/llcommon/llstring.h')
-rw-r--r-- | indra/llcommon/llstring.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 1fd6cac14a..7ba5c8c241 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -1668,13 +1668,13 @@ std::basic_string<T> LLStringUtilBase<T>::quote(const string_type& str, // For whatever reason, we must quote this string. string_type result; result.push_back('"'); - for (typename string_type::const_iterator ci(str.begin()), cend(str.end()); ci != cend; ++ci) + for (typename const S8 c : str) { - if (*ci == '"') + if (c == '"') { result.append(escape); } - result.push_back(*ci); + result.push_back(c); } result.push_back('"'); return result; |