diff options
author | Simon Warta <[email protected]> | 2015-09-22 23:13:08 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-09-22 23:13:08 +0200 |
commit | 1f62dbcd0108a2cd99ad473299e041163a638b1c (patch) | |
tree | fb74d95411c5f8c41ca7f409cfc8d36513023363 /src/lib/base | |
parent | ac9689990da914cd58788dab9d5e0d7bebb72e30 (diff) |
Avoid concatination of chars
Ever tried?
auto str = "some long string";
auto str2 = str + '\n';
It's not with the brainfuck finding the bug.
Diffstat (limited to 'src/lib/base')
-rw-r--r-- | src/lib/base/scan_name.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/base/scan_name.cpp b/src/lib/base/scan_name.cpp index 4b0c95004..5c8c55b27 100644 --- a/src/lib/base/scan_name.cpp +++ b/src/lib/base/scan_name.cpp @@ -29,7 +29,7 @@ std::string make_arg( if(name[i].first > level) { - output += '(' + name[i].second; + output += "(" + name[i].second; ++paren_depth; } else if(name[i].first < level) @@ -48,7 +48,7 @@ std::string make_arg( } for(size_t i = 0; i != paren_depth; ++i) - output += ')'; + output += ")"; return output; } @@ -141,14 +141,14 @@ std::string SCAN_Name::all_arguments() const std::string out; if(arg_count()) { - out += '('; + out += "("; for(size_t i = 0; i != arg_count(); ++i) { out += arg(i); if(i != arg_count() - 1) - out += ','; + out += ","; } - out += ')'; + out += ")"; } return out; } |