Erase from a string instead of using substr when you don't really need to.

llvm-svn: 130013
This commit is contained in:
Greg Clayton
2011-04-22 20:58:45 +00:00
parent ee674fb73d
commit a348259b3d

View File

@@ -956,7 +956,7 @@ CommandInterpreter::HandleCommand (const char *command_line,
std::string white_space (" \t\v");
size_t pos = remainder.find_first_not_of (white_space);
if (pos != 0 && pos != std::string::npos)
remainder = remainder.substr (pos);
remainder.erase(0, pos);
if (log)
log->Printf ("HandleCommand, command line after removing command name(s): '%s'\n", remainder.c_str());