refactor: replace remaining NULL with nullptr (#40053)

refactor: use nullptr everywhere
This commit is contained in:
Milan Burda 2023-10-03 21:26:35 +02:00 committed by GitHub
parent 9d0e6d09f0
commit 04b2ba84cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 98 additions and 93 deletions

View file

@ -63,7 +63,7 @@ void App::SetActivationPolicy(gin_helper::ErrorThrower thrower,
bool App::IsRunningUnderARM64Translation() const {
int proc_translated = 0;
size_t size = sizeof(proc_translated);
if (sysctlbyname("sysctl.proc_translated", &proc_translated, &size, NULL,
if (sysctlbyname("sysctl.proc_translated", &proc_translated, &size, nullptr,
0) == -1) {
return false;
}

View file

@ -132,7 +132,7 @@ struct Converter<electron::ElectronMenuModel*> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val,
electron::ElectronMenuModel** out) {
// null would be transferred to NULL.
// null would be transferred to nullptr.
if (val->IsNull()) {
*out = nullptr;
return true;

View file

@ -27,8 +27,8 @@ void PowerMonitor::InitPlatformSpecificMonitors() {
WNDCLASSEX window_class;
base::win::InitializeWindowClass(
kPowerMonitorWindowClass,
&base::win::WrappedWindowProc<PowerMonitor::WndProcStatic>, 0, 0, 0, NULL,
NULL, NULL, NULL, NULL, &window_class);
&base::win::WrappedWindowProc<PowerMonitor::WndProcStatic>, 0, 0, 0,
nullptr, nullptr, nullptr, nullptr, nullptr, &window_class);
instance_ = window_class.hInstance;
atom_ = RegisterClassEx(&window_class);

View file

@ -171,7 +171,7 @@ void SystemPreferences::InitializeWindow() {
base::win::InitializeWindowClass(
kSystemPreferencesWindowClass,
&base::win::WrappedWindowProc<SystemPreferences::WndProcStatic>, 0, 0, 0,
NULL, NULL, NULL, NULL, NULL, &window_class);
nullptr, nullptr, nullptr, nullptr, nullptr, &window_class);
instance_ = window_class.hInstance;
atom_ = RegisterClassEx(&window_class);