Don't default-construct std::strings and then assign them.
Change-Id: I8c994d1e6a8d2ebe52eaa4f0132e0deb2ecfa5f3
diff --git a/src/runtime.cc b/src/runtime.cc
index 1304787..ad86e05 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -278,7 +278,7 @@
} else if (option.starts_with("-Xcheck:jni")) {
parsed->check_jni_ = true;
} else if (option.starts_with("-Xrunjdwp:") || option.starts_with("-agentlib:jdwp=")) {
- std::string tail = option.substr(option[1] == 'X' ? 10 : 15).ToString();
+ std::string tail(option.substr(option[1] == 'X' ? 10 : 15).ToString());
if (tail == "help" || !Dbg::ParseJdwpOptions(tail)) {
LOG(FATAL) << "Example: -Xrunjdwp:transport=dt_socket,address=8000,server=y\n"
<< "Example: -Xrunjdwp:transport=dt_socket,address=localhost:6500,server=n";