[warning] use nullptr for C++ code

This commit is contained in:
akallabeth 2024-02-12 11:07:03 +01:00 committed by akallabeth
parent b894199f72
commit fd49e00f9c
2 changed files with 3 additions and 3 deletions

View File

@ -247,7 +247,7 @@ bool SdlWidget::update_text(SDL_Renderer* renderer, const std::string& text, SDL
{
texture = _image;
dst = _rect;
auto rc = SDL_QueryTexture(_image, NULL, NULL, &src.w, &src.h);
auto rc = SDL_QueryTexture(_image, nullptr, nullptr, &src.w, &src.h);
if (rc < 0)
widget_log_error(rc, "SDL_QueryTexture");
}

View File

@ -670,7 +670,7 @@ static const char* sdl_window_get_title(rdpSettings* settings)
sprintf_s(buffer, sizeof(buffer), "%s %s:%" PRIu32, prefix, name, port);
if (!freerdp_settings_set_string(settings, FreeRDP_WindowTitle, buffer))
return NULL;
return nullptr;
return freerdp_settings_get_string(settings, FreeRDP_WindowTitle);
}
@ -1197,7 +1197,7 @@ static DWORD WINAPI sdl_client_thread_proc(SdlContext* sdl)
DWORD nCount = 0;
DWORD status = 0;
int exit_code = SDL_EXIT_SUCCESS;
char* error_msg = NULL;
char* error_msg = nullptr;
size_t error_msg_len = 0;
HANDLE handles[MAXIMUM_WAIT_OBJECTS] = {};