[Lldb-commits] [lldb] r130013 - /lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Greg Clayton gclayton at apple.com
Fri Apr 22 13:58:45 PDT 2011


Author: gclayton
Date: Fri Apr 22 15:58:45 2011
New Revision: 130013

URL: http://llvm.org/viewvc/llvm-project?rev=130013&view=rev
Log:
Erase from a string instead of using substr when you don't really need to.


Modified:
    lldb/trunk/source/Interpreter/CommandInterpreter.cpp

Modified: lldb/trunk/source/Interpreter/CommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandInterpreter.cpp?rev=130013&r1=130012&r2=130013&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandInterpreter.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandInterpreter.cpp Fri Apr 22 15:58:45 2011
@@ -956,7 +956,7 @@
         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());





More information about the lldb-commits mailing list