Commit 1c3e193d authored by Hans Johnson's avatar Hans Johnson
Browse files

COMP: Use nullptr instead of 0 or NULL

The check converts the usage of null pointer constants (eg. NULL, 0) to
use the new C++11 nullptr keyword.

cd
run-clang-tidy.py -extra-arg=-D__clang__ -checks=-*,modernize-use-nullptr  -header-filter=.* -fix
parent 8a7fe7ac
......@@ -899,7 +899,7 @@ int LoadLines(FILE* file, std::vector<std::string>& lines)
int LoadLines(const char* fileName, std::vector<std::string>& lines)
{
FILE* file = fopen(fileName, "r");
if (file == 0) {
if (file == nullptr) {
return 0;
}
int nRead = LoadLines(file, lines);
......@@ -3441,7 +3441,7 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile()
// Linux Sparc: CPU speed is in Hz and encoded in hexadecimal
CPUSpeed = this->ExtractValueFromCpuInfoFile(buffer, "Cpu0ClkTck");
this->CPUSpeedInMHz =
static_cast<float>(strtoull(CPUSpeed.c_str(), 0, 16)) / 1000000.0f;
static_cast<float>(strtoull(CPUSpeed.c_str(), nullptr, 16)) / 1000000.0f;
}
#endif
......
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