From ee7daf76c01cdcd4a9ff1a7d1f2591b0886afba3 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Tue, 9 Apr 2019 22:47:34 +0800 Subject: src: remove redundant string initialization PR-URL: https://github.com/nodejs/node/pull/27152 Reviewed-By: Richard Lau Reviewed-By: Refael Ackermann Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- src/node_report_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/node_report_utils.cc') diff --git a/src/node_report_utils.cc b/src/node_report_utils.cc index 23d18fab99..81fdeda040 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) { -- cgit v1.2.3