mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
This commit is contained in:
@ -14,7 +14,7 @@ const char procfile[] = "/proc/cpuinfo";
|
||||
char *GetCPUString()
|
||||
{
|
||||
const char marker[] = "Hardware\t: ";
|
||||
char *cpu_string = 0;
|
||||
char *cpu_string = nullptr;
|
||||
// Count the number of processor lines in /proc/cpuinfo
|
||||
char buf[1024];
|
||||
|
||||
@ -38,7 +38,7 @@ char *GetCPUString()
|
||||
unsigned char GetCPUImplementer()
|
||||
{
|
||||
const char marker[] = "CPU implementer\t: ";
|
||||
char *implementer_string = 0;
|
||||
char *implementer_string = nullptr;
|
||||
unsigned char implementer = 0;
|
||||
char buf[1024];
|
||||
|
||||
@ -65,7 +65,7 @@ unsigned char GetCPUImplementer()
|
||||
unsigned short GetCPUPart()
|
||||
{
|
||||
const char marker[] = "CPU part\t: ";
|
||||
char *part_string = 0;
|
||||
char *part_string = nullptr;
|
||||
unsigned short part = 0;
|
||||
char buf[1024];
|
||||
|
||||
@ -105,11 +105,11 @@ bool CheckCPUFeature(const char *feature)
|
||||
continue;
|
||||
char *featurestring = buf + sizeof(marker) - 1;
|
||||
char *token = strtok(featurestring, " ");
|
||||
while (token != NULL)
|
||||
while (token != nullptr)
|
||||
{
|
||||
if (strstr(token, feature))
|
||||
return true;
|
||||
token = strtok(NULL, " ");
|
||||
token = strtok(nullptr, " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user