[client,sdl] fix compiler warnings

This commit is contained in:
akallabeth 2023-08-25 10:32:53 +02:00 committed by akallabeth
parent 1b2335873a
commit ad11ef916c
9 changed files with 9 additions and 13 deletions

View File

@ -785,7 +785,7 @@ namespace webview
GtkWidget* m_webview;
void* navigateCallbackArg = nullptr;
std::function<void(const std::string&, void*)> navigateCallback = 0;
std::function<void(const std::string&, void*)> navigateCallback = nullptr;
static void on_load_changed(WebKitWebView* web_view, WebKitLoadEvent load_event,
gpointer arg)
@ -2666,7 +2666,7 @@ namespace webview
}
private:
void on_message(const std::string& msg)
void on_message(const std::string& msg) override
{
auto seq = detail::json_parse(msg, "id", 0);
auto name = detail::json_parse(msg, "method", 0);

View File

@ -9,7 +9,7 @@ class SdlButton : public SdlWidget
public:
SdlButton(SDL_Renderer* renderer, const std::string& label, int id, const SDL_Rect& rect);
SdlButton(SdlButton&& other) noexcept;
virtual ~SdlButton();
virtual ~SdlButton() override;
bool highlight(SDL_Renderer* renderer);
bool update(SDL_Renderer* renderer);

View File

@ -2,7 +2,6 @@
#include "sdl_buttons.hpp"
static const Uint32 vpadding = 5;
static const Uint32 hpadding = 10;
SdlButtonList::SdlButtonList()

View File

@ -4,7 +4,6 @@
#include "sdl_input_widgets.hpp"
static const Uint32 vpadding = 5;
static const Uint32 hpadding = 10;
SdlInputWidgetList::SdlInputWidgetList(const std::string& title,
const std::vector<std::string>& labels,

View File

@ -30,7 +30,7 @@ class SdlSelectWidget : public SdlWidget
public:
SdlSelectWidget(SDL_Renderer* renderer, const std::string& label, const SDL_Rect& rect);
SdlSelectWidget(SdlSelectWidget&& other) noexcept;
virtual ~SdlSelectWidget();
virtual ~SdlSelectWidget() override;
bool set_mouseover(SDL_Renderer* renderer, bool mouseOver);
bool set_highlight(SDL_Renderer* renderer, bool highlight);

View File

@ -1,7 +1,6 @@
#include "sdl_selectlist.hpp"
static const Uint32 vpadding = 5;
static const Uint32 hpadding = 10;
SdlSelectList::SdlSelectList(const std::string& title, const std::vector<std::string>& labels)
: _window(nullptr), _renderer(nullptr)

View File

@ -35,7 +35,6 @@
static const SDL_Color backgroundcolor = { 0x38, 0x36, 0x35, 0xff };
static const Uint32 vpadding = 5;
static const Uint32 hpadding = 10;
SdlWidget::SdlWidget(SDL_Renderer* renderer, const SDL_Rect& rect, bool input)

View File

@ -852,7 +852,7 @@ static int sdl_run(SdlContext* sdl)
Uint32 curFlags = SDL_GetWindowFlags(window);
if (windowEvent.user.code != 0 ? SDL_TRUE : SDL_FALSE)
if (enter)
{
if (!(curFlags & SDL_WINDOW_BORDERLESS))
{

View File

@ -183,10 +183,10 @@ static BOOL sdl_Pointer_SetPosition(rdpContext* context, UINT32 x, UINT32 y)
BOOL sdl_register_pointer(rdpGraphics* graphics)
{
const rdpPointer pointer = { sizeof(sdlPointer), sdl_Pointer_New,
sdl_Pointer_Free, sdl_Pointer_Set,
sdl_Pointer_SetNull, sdl_Pointer_SetDefault,
sdl_Pointer_SetPosition };
const rdpPointer pointer = { sizeof(sdlPointer), sdl_Pointer_New,
sdl_Pointer_Free, sdl_Pointer_Set,
sdl_Pointer_SetNull, sdl_Pointer_SetDefault,
sdl_Pointer_SetPosition, 0 };
graphics_register_pointer(graphics, &pointer);
return TRUE;
}