summaryrefslogtreecommitdiffstats
path: root/CommandLineArguments.cxx
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2018-01-23 18:07:33 (GMT)
committerBrad King <brad.king@kitware.com>2018-01-24 19:11:06 (GMT)
commit7a75657084c518a39b192c7ee1568588944677af (patch)
treee425d65299f889b6e5d71be8c21bf3d236cdde85 /CommandLineArguments.cxx
parent86399e49398cc9e8028e280eee3e89992ab3fd11 (diff)
downloadCMake-7a75657084c518a39b192c7ee1568588944677af.zip
CMake-7a75657084c518a39b192c7ee1568588944677af.tar.gz
CMake-7a75657084c518a39b192c7ee1568588944677af.tar.bz2
KWSys 2018-01-23 (0579db1c)
Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 0579db1c97715f9936523dd473c0ed7613b68e68 (master). Upstream Shortlog ----------------- Ben Boeckel (1): 3e807fd6 cmake: specify source file extensions Brad King (1): 38855ca1 Set CMP0042 explicitly with CMake 3.0 and above Chuck Atkins (1): 4ca97fc6 SystemTools: Disable getpwnam for static linux builds Hans Johnson (1): 7d7f3b2d Configure: Add KWSYS_NULLPTR macro for C++ code Sankhesh Jhaveri (1): 20c458d0 Set CMP0022 policy to new to provide link interface definitions Sean McBride (1): c6829e4d Fixed a few comments, mostly regarding base 2 vs base 10 sizes luz.paz (1): 4b67f965 Remove superfluous double whitespace in appropriate places
Diffstat (limited to 'CommandLineArguments.cxx')
-rw-r--r--CommandLineArguments.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/CommandLineArguments.cxx b/CommandLineArguments.cxx
index 5792da9..a6387ea 100644
--- a/CommandLineArguments.cxx
+++ b/CommandLineArguments.cxx
@@ -68,8 +68,8 @@ class CommandLineArgumentsInternal
public:
CommandLineArgumentsInternal()
{
- this->UnknownArgumentCallback = 0;
- this->ClientData = 0;
+ this->UnknownArgumentCallback = KWSYS_NULLPTR;
+ this->ClientData = KWSYS_NULLPTR;
this->LastArgument = 0;
}
@@ -187,7 +187,7 @@ int CommandLineArguments::Parse()
switch (cs->ArgumentType) {
case NO_ARGUMENT:
// No value
- if (!this->PopulateVariable(cs, 0)) {
+ if (!this->PopulateVariable(cs, KWSYS_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 = 0;
+ s.Variable = KWSYS_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 = 0;
- s.CallData = 0;
+ s.Callback = KWSYS_NULLPTR;
+ s.CallData = KWSYS_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 0;
+ return KWSYS_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 = 0;
+ char* res = KWSYS_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 = 0;
+ char* res = KWSYS_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 = 0;
+ char* res = KWSYS_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 = 0;
+ char* res = KWSYS_NULLPTR;
variable->push_back(strtod(value.c_str(), &res));
// if ( res && *res )
// {