mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 00:03:58 +01:00
Global: replaces NULL to nullptr
This commit is contained in:
@@ -11,7 +11,7 @@ const char* ffDetectFont(FFFontResult* font) {
|
||||
|
||||
for (uint32_t i = 0; i < FF_DETECT_FONT_NUM_FONTS; ++i) {
|
||||
if (font->fonts[i].length > 0) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,5 +33,5 @@ const char* ffDetectFontImpl(FFFontResult* result)
|
||||
ffStrbufAppendS(&result->fonts[3], [NSFont userFixedPitchFontOfSize:12].familyName.UTF8String);
|
||||
generateString(result);
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -32,23 +32,23 @@ const char* ffDetectFontImpl(FFFontResult* result) {
|
||||
// We need a valid be_app to query the app_server here.
|
||||
BApplication app("application/x-vnd.fastfetch-cli-fastfetch");
|
||||
|
||||
if ((f = be_plain_font) != NULL) {
|
||||
if ((f = be_plain_font) != nullptr) {
|
||||
f->GetFamilyAndStyle(&menuInfo.f_family, &menuInfo.f_style);
|
||||
ffStrbufAppendF(&result->fonts[0], "%s %s (%dpt)", menuInfo.f_family, menuInfo.f_style, (int) f->Size());
|
||||
}
|
||||
if (get_menu_info(&menuInfo) == B_OK) {
|
||||
ffStrbufAppendF(&result->fonts[1], "%s %s (%dpt)", menuInfo.f_family, menuInfo.f_style, (int) menuInfo.font_size);
|
||||
}
|
||||
if ((f = be_bold_font) != NULL) {
|
||||
if ((f = be_bold_font) != nullptr) {
|
||||
f->GetFamilyAndStyle(&menuInfo.f_family, &menuInfo.f_style);
|
||||
ffStrbufAppendF(&result->fonts[2], "%s %s (%dpt)", menuInfo.f_family, menuInfo.f_style, (int) f->Size());
|
||||
}
|
||||
if ((f = be_fixed_font) != NULL) {
|
||||
if ((f = be_fixed_font) != nullptr) {
|
||||
f->GetFamilyAndStyle(&menuInfo.f_family, &menuInfo.f_style);
|
||||
ffStrbufAppendF(&result->fonts[3], "%s %s (%dpt)", menuInfo.f_family, menuInfo.f_style, (int) f->Size());
|
||||
}
|
||||
|
||||
generateString(result);
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -49,5 +49,5 @@ const char* ffDetectFontImpl(FFFontResult* result) {
|
||||
|
||||
generateString(result);
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ static void generateString(FFFontResult* font) {
|
||||
}
|
||||
|
||||
const char* ffDetectFontImpl(FFFontResult* result) {
|
||||
FF_AUTO_CLOSE_FD HANDLE hKey = NULL;
|
||||
if (!ffRegOpenKeyForRead(HKEY_CURRENT_USER, L"Control Panel\\Desktop\\WindowMetrics", &hKey, NULL)) {
|
||||
FF_AUTO_CLOSE_FD HANDLE hKey = nullptr;
|
||||
if (!ffRegOpenKeyForRead(HKEY_CURRENT_USER, L"Control Panel\\Desktop\\WindowMetrics", &hKey, nullptr)) {
|
||||
return "ffRegOpenKeyForRead(HKEY_CURRENT_USER\\Control Panel\\Desktop\\WindowMetrics) failed";
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ const char* ffDetectFontImpl(FFFontResult* result) {
|
||||
FF_ARG(fontBuffers[2], L"MessageFont"),
|
||||
FF_ARG(fontBuffers[3], L"StatusFont"),
|
||||
},
|
||||
NULL)) {
|
||||
nullptr)) {
|
||||
return "ffRegReadValues(HKEY_CURRENT_USER\\Control Panel\\Desktop\\WindowMetrics) failed";
|
||||
}
|
||||
|
||||
@@ -59,5 +59,5 @@ const char* ffDetectFontImpl(FFFontResult* result) {
|
||||
|
||||
generateString(result);
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user