Replace NULL with nullptr

This commit is contained in:
lupoDharkael
2020-04-02 01:20:12 +02:00
parent 2283ef2994
commit a5c4985328
3 changed files with 13 additions and 13 deletions

View File

@@ -34,7 +34,7 @@
#include "core/project_settings.h"
int32_t *AudioDriverMediaKit::samples_in = NULL;
int32_t *AudioDriverMediaKit::samples_in = nullptr;
Error AudioDriverMediaKit::init() {
active = false;
@@ -59,12 +59,12 @@ Error AudioDriverMediaKit::init() {
&format,
"godot_sound_server",
AudioDriverMediaKit::PlayBuffer,
NULL,
nullptr,
this);
if (player->InitCheck() != B_OK) {
fprintf(stderr, "MediaKit ERR: can not create a BSoundPlayer instance\n");
ERR_FAIL_COND_V(player == NULL, ERR_CANT_OPEN);
ERR_FAIL_COND_V(player == nullptr, ERR_CANT_OPEN);
}
player->Start();
@@ -126,7 +126,7 @@ void AudioDriverMediaKit::finish() {
}
AudioDriverMediaKit::AudioDriverMediaKit() {
player = NULL;
player = nullptr;
}
AudioDriverMediaKit::~AudioDriverMediaKit() {

View File

@@ -42,10 +42,10 @@ HaikuDirectWindow::HaikuDirectWindow(BRect p_frame) :
last_button_mask = 0;
last_key_modifier_state = 0;
view = NULL;
update_runner = NULL;
input = NULL;
main_loop = NULL;
view = nullptr;
update_runner = nullptr;
input = nullptr;
main_loop = nullptr;
}
HaikuDirectWindow::~HaikuDirectWindow() {
@@ -278,7 +278,7 @@ void HaikuDirectWindow::HandleKeyboardEvent(BMessage *message) {
event->set_echo(message->HasInt32("be:key_repeat"));
event->set_unicode(0);
const char *bytes = NULL;
const char *bytes = nullptr;
if (message->FindString("bytes", &bytes) == B_OK) {
event->set_unicode(BUnicodeChar::FromUTF8(&bytes));
}

View File

@@ -85,7 +85,7 @@ int OS_Haiku::get_current_video_driver() const {
}
Error OS_Haiku::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
main_loop = NULL;
main_loop = nullptr;
current_video_mode = p_desired;
app = new HaikuApplication();
@@ -142,7 +142,7 @@ void OS_Haiku::finalize() {
memdelete(main_loop);
}
main_loop = NULL;
main_loop = nullptr;
rendering_server->finish();
memdelete(rendering_server);
@@ -169,8 +169,8 @@ void OS_Haiku::delete_main_loop() {
memdelete(main_loop);
}
main_loop = NULL;
window->SetMainLoop(NULL);
main_loop = nullptr;
window->SetMainLoop(nullptr);
}
void OS_Haiku::release_rendering_thread() {