Index: base/command_line.cc |
=================================================================== |
--- base/command_line.cc (revision 66088) |
+++ base/command_line.cc (working copy) |
@@ -431,14 +431,7 @@ |
// Verify include_program is used correctly. |
// Logic could be shorter but this is clearer. |
DCHECK_EQ(include_program, !other.GetProgram().empty()); |
- if (include_program) |
- program_ = other.program_; |
- |
- if (!command_line_string_.empty()) |
- command_line_string_ += L' '; |
- |
- command_line_string_ += other.command_line_string_; |
- |
+ command_line_string_ += L" " + other.command_line_string_; |
std::map<std::string, StringType>::const_iterator i; |
for (i = other.switches_.begin(); i != other.switches_.end(); ++i) |
switches_[i->first] = i->second; |
@@ -489,15 +482,9 @@ |
// Verify include_program is used correctly. |
// Logic could be shorter but this is clearer. |
DCHECK_EQ(include_program, !other.GetProgram().empty()); |
- |
- if (include_program) |
- argv_[0] = other.argv_[0]; |
- |
- // Skip the first arg when copying since it's the program but push all |
- // arguments to our arg vector. |
- for (size_t i = 1; i < other.argv_.size(); ++i) |
+ size_t first_arg = include_program ? 0 : 1; |
+ for (size_t i = first_arg; i < other.argv_.size(); ++i) |
argv_.push_back(other.argv_[i]); |
- |
std::map<std::string, StringType>::const_iterator i; |
for (i = other.switches_.begin(); i != other.switches_.end(); ++i) |
switches_[i->first] = i->second; |