diff options
author | gengjiawen <technicalcute@gmail.com> | 2019-04-09 17:47:34 +0300 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2019-04-11 18:15:07 +0300 |
commit | ee7daf76c01cdcd4a9ff1a7d1f2591b0886afba3 (patch) | |
tree | d5b27d417a99c9ab71ac029c2dc5670362296153 /src/node_report_utils.cc | |
parent | 845a6214f842f3a5220f4bf4f209c0f5b25d48b5 (diff) |
src: remove redundant string initialization
PR-URL: https://github.com/nodejs/node/pull/27152
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_report_utils.cc')
-rw-r--r-- | src/node_report_utils.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_report_utils.cc b/src/node_report_utils.cc index 23d18fab99f..81fdeda0405 100644 --- a/src/node_report_utils.cc +++ b/src/node_report_utils.cc @@ -233,7 +233,7 @@ std::string EscapeJsonChars(const std::string& str) { "\\u001a", "\\u001b", "\\u001c", "\\u001d", "\\u001e", "\\u001f" }; - std::string ret = ""; + std::string ret; size_t last_pos = 0; size_t pos = 0; for (; pos < str.size(); ++pos) { |