summaryrefslogtreecommitdiff
path: root/zen/string_base.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-05-08 23:55:27 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2018-05-08 23:55:27 +0200
commit592d003fb937ed206c35082a412490400e489b12 (patch)
tree77187fb74a900258c9e00e695f2c7d2843e94165 /zen/string_base.h
parent9.0 (diff)
downloadFreeFileSync-592d003fb937ed206c35082a412490400e489b12.tar.gz
FreeFileSync-592d003fb937ed206c35082a412490400e489b12.tar.bz2
FreeFileSync-592d003fb937ed206c35082a412490400e489b12.zip
9.1
Diffstat (limited to 'zen/string_base.h')
-rwxr-xr-xzen/string_base.h16
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;
}
bgstack15