Commit 2a4c1252 authored by Hans Johnson's avatar Hans Johnson
Browse files

STYLE: Replace integer literals which are cast to bool.

Finds and replaces integer literals which are cast to bool.

cd ${BLDDIR}
run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,modernize-use-bool-literals  -header-filter=.* -fix
parent 1c3e193d
......@@ -709,7 +709,7 @@ bool CommandLineArguments::PopulateVariable(
if (cs->Callback) {
if (!cs->Callback(cs->Argument, value, cs->CallData)) {
this->Internals->LastArgument--;
return 0;
return false;
}
}
CommandLineArguments_DEBUG("Set argument: " << cs->Argument << " to "
......@@ -759,10 +759,10 @@ bool CommandLineArguments::PopulateVariable(
std::cerr << "Got unknown variable type: \"" << cs->VariableType
<< "\"" << std::endl;
this->Internals->LastArgument--;
return 0;
return false;
}
}
return 1;
return true;
}
} // namespace KWSYS_NAMESPACE
......@@ -204,7 +204,7 @@ bool Directory::Load(const std::string& name)
DIR* dir = opendir(name.c_str());
if (!dir) {
return 0;
return false;
}
for (kwsys_dirent* d = readdir(dir); d; d = readdir(dir)) {
......@@ -212,7 +212,7 @@ bool Directory::Load(const std::string& name)
}
this->Internal->Path = name;
closedir(dir);
return 1;
return true;
}
unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment