diff options
author | KWSys Upstream <kwrobot@kitware.com> | 2019-09-18 12:13:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-18 13:26:35 (GMT) |
commit | 3327c0402a1ce31615c7ad22c5ff5d5330fb75da (patch) | |
tree | fb4faa49f9546d9c9b97b12807994b5c3bcb328d /CommandLineArguments.cxx | |
parent | f9a3f13415bb6d6f1750cfe5a45ce4aa9e329907 (diff) | |
download | CMake-3327c0402a1ce31615c7ad22c5ff5d5330fb75da.zip CMake-3327c0402a1ce31615c7ad22c5ff5d5330fb75da.tar.gz CMake-3327c0402a1ce31615c7ad22c5ff5d5330fb75da.tar.bz2 |
KWSys 2019-09-18 (c6bc38c1)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit c6bc38c11a3a11e393f0608486b08dadc8dbacc3 (master).
Upstream Shortlog
-----------------
Sean McBride (5):
4de1241f Fixed -Wextra-semi-stmt warning
30de8e17 Fixed -Wsign-conversion warnings by adding casts
750da75a Fixed 64 to 32 bit truncation warning by casting
419aaa35 Fixed -Wunused-macros warnings
46c55893 Replaced several 0, NULL, and KWSYS_NULLPTR with nullptr
Diffstat (limited to 'CommandLineArguments.cxx')
-rw-r--r-- | CommandLineArguments.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/CommandLineArguments.cxx b/CommandLineArguments.cxx index dc9f01d..3fd1955 100644 --- a/CommandLineArguments.cxx +++ b/CommandLineArguments.cxx @@ -67,8 +67,8 @@ class CommandLineArgumentsInternal { public: CommandLineArgumentsInternal() - : UnknownArgumentCallback{ KWSYS_NULLPTR } - , ClientData{ KWSYS_NULLPTR } + : UnknownArgumentCallback{ nullptr } + , ClientData{ nullptr } , LastArgument{ 0 } { } @@ -187,7 +187,7 @@ int CommandLineArguments::Parse() switch (cs->ArgumentType) { case NO_ARGUMENT: // No value - if (!this->PopulateVariable(cs, KWSYS_NULLPTR)) { + if (!this->PopulateVariable(cs, nullptr)) { return 0; } break; @@ -340,7 +340,7 @@ void CommandLineArguments::AddCallback(const char* argument, s.Callback = callback; s.CallData = call_data; s.VariableType = CommandLineArguments::NO_VARIABLE_TYPE; - s.Variable = KWSYS_NULLPTR; + s.Variable = nullptr; s.Help = help; this->Internals->Callbacks[argument] = s; @@ -355,8 +355,8 @@ void CommandLineArguments::AddArgument(const char* argument, CommandLineArgumentsCallbackStructure s; s.Argument = argument; s.ArgumentType = type; - s.Callback = KWSYS_NULLPTR; - s.CallData = KWSYS_NULLPTR; + s.Callback = nullptr; + s.CallData = nullptr; s.VariableType = vtype; s.Variable = variable; s.Help = help; @@ -427,7 +427,7 @@ const char* CommandLineArguments::GetHelp(const char* arg) CommandLineArguments::Internal::CallbacksMap::iterator it = this->Internals->Callbacks.find(arg); if (it == this->Internals->Callbacks.end()) { - return KWSYS_NULLPTR; + return nullptr; } // Since several arguments may point to the same argument, find the one this @@ -621,7 +621,7 @@ void CommandLineArguments::PopulateVariable(bool* variable, void CommandLineArguments::PopulateVariable(int* variable, const std::string& value) { - char* res = KWSYS_NULLPTR; + char* res = nullptr; *variable = static_cast<int>(strtol(value.c_str(), &res, 10)); // if ( res && *res ) // { @@ -632,7 +632,7 @@ void CommandLineArguments::PopulateVariable(int* variable, void CommandLineArguments::PopulateVariable(double* variable, const std::string& value) { - char* res = KWSYS_NULLPTR; + char* res = nullptr; *variable = strtod(value.c_str(), &res); // if ( res && *res ) // { @@ -669,7 +669,7 @@ void CommandLineArguments::PopulateVariable(std::vector<bool>* variable, void CommandLineArguments::PopulateVariable(std::vector<int>* variable, const std::string& value) { - char* res = KWSYS_NULLPTR; + char* res = nullptr; variable->push_back(static_cast<int>(strtol(value.c_str(), &res, 10))); // if ( res && *res ) // { @@ -680,7 +680,7 @@ void CommandLineArguments::PopulateVariable(std::vector<int>* variable, void CommandLineArguments::PopulateVariable(std::vector<double>* variable, const std::string& value) { - char* res = KWSYS_NULLPTR; + char* res = nullptr; variable->push_back(strtod(value.c_str(), &res)); // if ( res && *res ) // { |