Skip to content

Commit ee7daf7

Browse files
gengjiawenrefack
authored andcommitted
src: remove redundant string initialization
PR-URL: #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>
1 parent 845a621 commit ee7daf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_report_utils.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ std::string EscapeJsonChars(const std::string& str) {
233233
"\\u001a", "\\u001b", "\\u001c", "\\u001d", "\\u001e", "\\u001f"
234234
};
235235

236-
std::string ret = "";
236+
std::string ret;
237237
size_t last_pos = 0;
238238
size_t pos = 0;
239239
for (; pos < str.size(); ++pos) {

0 commit comments

Comments
 (0)