diff options
author | Brad King <brad.king@kitware.com> | 2014-05-13 18:55:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-13 18:55:35 (GMT) |
commit | 7fa16df4d7ce963dda98a6c5d54f528db7a29037 (patch) | |
tree | 3ed99c648b9c58251a0773356ed646905b23de1b /Source/kwsys/CommandLineArguments.cxx | |
parent | 96e9eb1766261605ebc97009d6ace20214eaa9a4 (diff) | |
parent | 7762c57405d3b0daefc484a5e07bc24e04701615 (diff) | |
download | CMake-7fa16df4d7ce963dda98a6c5d54f528db7a29037.zip CMake-7fa16df4d7ce963dda98a6c5d54f528db7a29037.tar.gz CMake-7fa16df4d7ce963dda98a6c5d54f528db7a29037.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/CommandLineArguments.cxx')
-rw-r--r-- | Source/kwsys/CommandLineArguments.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx index ece88ae..9fa9802 100644 --- a/Source/kwsys/CommandLineArguments.cxx +++ b/Source/kwsys/CommandLineArguments.cxx @@ -178,7 +178,7 @@ bool CommandLineArguments::GetMatchedArguments( matches->push_back(parg); } } - return matches->size() > 0; + return !matches->empty(); } //---------------------------------------------------------------------------- @@ -235,7 +235,7 @@ int CommandLineArguments::Parse() return 0; } CommandLineArguments_DEBUG("This is a space argument: " << arg - << " value: " << this->Internals->Argv[cc+1].c_str()); + << " value: " << this->Internals->Argv[cc+1]); // Value is the next argument if ( !this->PopulateVariable(cs, this->Internals->Argv[cc+1].c_str()) ) { @@ -244,7 +244,7 @@ int CommandLineArguments::Parse() cc ++; break; case EQUAL_ARGUMENT: - if ( arg.size() == sarg.size() || *(arg.c_str() + sarg.size()) != '=' ) + if ( arg.size() == sarg.size() || arg.at(sarg.size()) != '=' ) { this->Internals->LastArgument --; return 0; @@ -309,11 +309,11 @@ int CommandLineArguments::Parse() else if ( this->StoreUnusedArgumentsFlag ) { CommandLineArguments_DEBUG("Store unused argument " << arg); - this->Internals->UnusedArguments.push_back(arg.c_str()); + this->Internals->UnusedArguments.push_back(arg); } else { - kwsys_ios::cerr << "Got unknown argument: \"" << arg.c_str() << "\"" << kwsys_ios::endl; + kwsys_ios::cerr << "Got unknown argument: \"" << arg << "\"" << kwsys_ios::endl; this->Internals->LastArgument --; return 0; } |