diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-08 23:55:27 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2018-05-08 23:55:27 +0200 |
commit | 592d003fb937ed206c35082a412490400e489b12 (patch) | |
tree | 77187fb74a900258c9e00e695f2c7d2843e94165 /zen/string_base.h | |
parent | 9.0 (diff) | |
download | FreeFileSync-592d003fb937ed206c35082a412490400e489b12.tar.gz FreeFileSync-592d003fb937ed206c35082a412490400e489b12.tar.bz2 FreeFileSync-592d003fb937ed206c35082a412490400e489b12.zip |
9.1
Diffstat (limited to 'zen/string_base.h')
-rwxr-xr-x | zen/string_base.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/zen/string_base.h b/zen/string_base.h index 2ec2e894..cb7ced20 100755 --- a/zen/string_base.h +++ b/zen/string_base.h @@ -573,14 +573,14 @@ template <class InputIterator> inline Zbase<Char, SP>& Zbase<Char, SP>::append(InputIterator first, InputIterator last) { const size_t len = std::distance(first, last); - if (len > 0) //avoid making this string unshared for no reason - { - const size_t thisLen = length(); - reserve(thisLen + len); //make unshared and check capacity - - *std::copy(first, last, rawStr_ + thisLen) = 0; - this->setLength(rawStr_, thisLen + len); - } + if (len > 0) //avoid making this string unshared for no reason + { + const size_t thisLen = length(); + reserve(thisLen + len); //make unshared and check capacity + + *std::copy(first, last, rawStr_ + thisLen) = 0; + this->setLength(rawStr_, thisLen + len); + } return *this; } |