diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-11-03 18:56:47 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-11-03 18:56:47 +0900 |
| commit | 84bc2c7ae8f14e909df0ce73463e8e24e1b0e464 (patch) | |
| tree | 45ef78266b2d0dda8757767c11c7016a238ffec9 /src/json.cc | |
| parent | 9bb914b76e61dfed6044afee529eb92344bbca7a (diff) | |
Use std::string::append instead of appending std::string() temporaries.
Diffstat (limited to 'src/json.cc')
| -rw-r--r-- | src/json.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/json.cc b/src/json.cc index e686b606..501c9cff 100644 --- a/src/json.cc +++ b/src/json.cc @@ -156,7 +156,7 @@ decodeString break; } if(*first == '\\') { - s += std::string(offset, first); + s.append(offset, first); ++first; checkEof(first, last); if(*first == 'u') { @@ -235,7 +235,7 @@ decodeString } checkEof(first, last); if(std::distance(offset, first) > 0) { - s += std::string(offset, first); + s.append(offset, first); } if(!util::isUtf8(s)) { throw DL_ABORT_EX2("JSON decoding failed: Non UTF-8 string.", |
