diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-08 03:17:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-08 03:17:28 +0300 |
commit | 4acdea8dc3c12147965f63b2974d192d8cd0ed34 (patch) | |
tree | 0d2b9a697e19c4e3149749c1cc200443dcbc6e34 /src/utils/stringutils.cpp | |
parent | aa0e715fe63eed2795944fda68ab64270b51453b (diff) | |
download | ManaVerse-4acdea8dc3c12147965f63b2974d192d8cd0ed34.tar.gz ManaVerse-4acdea8dc3c12147965f63b2974d192d8cd0ed34.tar.bz2 ManaVerse-4acdea8dc3c12147965f63b2974d192d8cd0ed34.tar.xz ManaVerse-4acdea8dc3c12147965f63b2974d192d8cd0ed34.zip |
Improve strings concatination performance.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r-- | src/utils/stringutils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index d21702ed1..1f0888629 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -431,7 +431,7 @@ void replaceSpecialChars(std::string &text) std::string str(" "); str[0] = CAST_S8(atoi(text.substr( idx, f - idx).c_str())); - text = text.substr(0, pos1) + str + text.substr(f + 1); + text = text.substr(0, pos1).append(str).append(text.substr(f + 1)); pos1 += 1; } else |