mirror of
https://github.com/godotengine/godot-platform-haiku.git
synced 2025-12-31 13:48:19 +03:00
Replace NULL with nullptr
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user