diff --git a/client/SDL/SDL2/dialogs/res/sdl2_resource_manager.hpp b/client/SDL/SDL2/dialogs/res/sdl2_resource_manager.hpp index fc8d12bc3..de1fcea11 100644 --- a/client/SDL/SDL2/dialogs/res/sdl2_resource_manager.hpp +++ b/client/SDL/SDL2/dialogs/res/sdl2_resource_manager.hpp @@ -31,7 +31,7 @@ class SDL2ResourceManager : public SDLResourceManager SDL2ResourceManager(const SDL2ResourceManager& other) = delete; SDL2ResourceManager(const SDL2ResourceManager&& other) = delete; ~SDL2ResourceManager() = delete; - SDL2ResourceManager operator=(const SDL2ResourceManager& other) = delete; + SDL2ResourceManager& operator=(const SDL2ResourceManager& other) = delete; SDL2ResourceManager& operator=(SDL2ResourceManager&& other) = delete; static SDL_RWops* get(const std::string& type, const std::string& id); diff --git a/client/SDL/SDL2/dialogs/sdl_button.cpp b/client/SDL/SDL2/dialogs/sdl_button.cpp index 9962829df..b174dbf08 100644 --- a/client/SDL/SDL2/dialogs/sdl_button.cpp +++ b/client/SDL/SDL2/dialogs/sdl_button.cpp @@ -41,6 +41,8 @@ SdlButton::SdlButton(SdlButton&& other) noexcept { } +SdlButton::~SdlButton() = default; + bool SdlButton::highlight(SDL_Renderer* renderer) { assert(renderer); diff --git a/client/SDL/SDL2/dialogs/sdl_button.hpp b/client/SDL/SDL2/dialogs/sdl_button.hpp index cf47d11f4..9fcb350a2 100644 --- a/client/SDL/SDL2/dialogs/sdl_button.hpp +++ b/client/SDL/SDL2/dialogs/sdl_button.hpp @@ -8,8 +8,12 @@ class SdlButton : public SdlWidget { public: SdlButton(SDL_Renderer* renderer, std::string label, int id, SDL_Rect rect); + SdlButton(const SdlButton& other) = delete; SdlButton(SdlButton&& other) noexcept; - ~SdlButton() override = default; + ~SdlButton() override; + + SdlButton& operator=(const SdlButton& other) = delete; + SdlButton& operator=(SdlButton&& other) = delete; bool highlight(SDL_Renderer* renderer); bool mouseover(SDL_Renderer* renderer); @@ -18,8 +22,6 @@ class SdlButton : public SdlWidget [[nodiscard]] int id() const; private: - SdlButton(const SdlButton& other) = delete; - std::string _name; int _id; }; diff --git a/client/SDL/SDL2/dialogs/sdl_buttons.cpp b/client/SDL/SDL2/dialogs/sdl_buttons.cpp index 8190cbe6d..a3109607a 100644 --- a/client/SDL/SDL2/dialogs/sdl_buttons.cpp +++ b/client/SDL/SDL2/dialogs/sdl_buttons.cpp @@ -5,6 +5,8 @@ static const Uint32 hpadding = 10; +SdlButtonList::~SdlButtonList() = default; + bool SdlButtonList::populate(SDL_Renderer* renderer, const std::vector& labels, const std::vector& ids, Sint32 total_width, Sint32 offsetY, Sint32 width, Sint32 height) diff --git a/client/SDL/SDL2/dialogs/sdl_buttons.hpp b/client/SDL/SDL2/dialogs/sdl_buttons.hpp index 379cdae3e..215f1d250 100644 --- a/client/SDL/SDL2/dialogs/sdl_buttons.hpp +++ b/client/SDL/SDL2/dialogs/sdl_buttons.hpp @@ -9,7 +9,7 @@ class SdlButtonList { public: SdlButtonList() = default; - virtual ~SdlButtonList() = default; + virtual ~SdlButtonList(); bool populate(SDL_Renderer* renderer, const std::vector& labels, const std::vector& ids, Sint32 total_width, Sint32 offsetY, Sint32 width, @@ -25,10 +25,12 @@ class SdlButtonList void clear(); - private: SdlButtonList(const SdlButtonList& other) = delete; SdlButtonList(SdlButtonList&& other) = delete; + SdlButtonList& operator=(const SdlButtonList& other) = delete; + SdlButtonList& operator=(SdlButtonList&& other) = delete; + private: std::vector _list; SdlButton* _highlighted = nullptr; size_t _highlight_index = 0; diff --git a/client/SDL/SDL2/dialogs/sdl_connection_dialog.hpp b/client/SDL/SDL2/dialogs/sdl_connection_dialog.hpp index 7d29153b9..3bf7bc2c3 100644 --- a/client/SDL/SDL2/dialogs/sdl_connection_dialog.hpp +++ b/client/SDL/SDL2/dialogs/sdl_connection_dialog.hpp @@ -39,6 +39,9 @@ class SDLConnectionDialog SDLConnectionDialog(const SDLConnectionDialog&& other) = delete; virtual ~SDLConnectionDialog(); + SDLConnectionDialog& operator=(const SDLConnectionDialog& other) = delete; + SDLConnectionDialog& operator=(SDLConnectionDialog&& other) = delete; + bool visible() const; bool setTitle(const char* fmt, ...); @@ -112,6 +115,10 @@ class SDLConnectionDialogHider explicit SDLConnectionDialogHider(rdpContext* context); explicit SDLConnectionDialogHider(SDLConnectionDialog* dialog); + SDLConnectionDialogHider(const SDLConnectionDialogHider& other) = delete; + SDLConnectionDialogHider(SDLConnectionDialogHider&& other) = delete; + SDLConnectionDialogHider& operator=(const SDLConnectionDialogHider& other) = delete; + SDLConnectionDialogHider& operator=(SDLConnectionDialogHider& other) = delete; ~SDLConnectionDialogHider(); diff --git a/client/SDL/SDL2/dialogs/sdl_input.hpp b/client/SDL/SDL2/dialogs/sdl_input.hpp index d78730189..8e4f29a5a 100644 --- a/client/SDL/SDL2/dialogs/sdl_input.hpp +++ b/client/SDL/SDL2/dialogs/sdl_input.hpp @@ -37,6 +37,10 @@ class SdlInputWidget SdlInputWidget(SDL_Renderer* renderer, std::string label, std::string initial, Uint32 flags, size_t offset, size_t width, size_t height); SdlInputWidget(SdlInputWidget&& other) noexcept; + SdlInputWidget(const SdlInputWidget& other) = delete; + + SdlInputWidget& operator=(const SdlInputWidget& other) = delete; + SdlInputWidget& operator=(SdlInputWidget&& other) = delete; bool fill_label(SDL_Renderer* renderer, SDL_Color color); bool update_label(SDL_Renderer* renderer); @@ -59,8 +63,6 @@ class SdlInputWidget bool update_input(SDL_Renderer* renderer, SDL_Color fgcolor); private: - SdlInputWidget(const SdlInputWidget& other) = delete; - Uint32 _flags; std::string _text; std::string _text_label; diff --git a/client/SDL/SDL2/dialogs/sdl_input_widgets.hpp b/client/SDL/SDL2/dialogs/sdl_input_widgets.hpp index 4a3c29bc6..7f4de64ec 100644 --- a/client/SDL/SDL2/dialogs/sdl_input_widgets.hpp +++ b/client/SDL/SDL2/dialogs/sdl_input_widgets.hpp @@ -12,6 +12,12 @@ class SdlInputWidgetList public: SdlInputWidgetList(const std::string& title, const std::vector& labels, const std::vector& initial, const std::vector& flags); + SdlInputWidgetList(const SdlInputWidgetList& other) = delete; + SdlInputWidgetList(SdlInputWidgetList&& other) = delete; + + SdlInputWidgetList& operator=(const SdlInputWidgetList& other) = delete; + SdlInputWidgetList& operator=(SdlInputWidgetList&& other) = delete; + virtual ~SdlInputWidgetList(); int run(std::vector& result); @@ -21,9 +27,6 @@ class SdlInputWidgetList ssize_t get_index(const SDL_MouseButtonEvent& button); private: - SdlInputWidgetList(const SdlInputWidgetList& other) = delete; - SdlInputWidgetList(SdlInputWidgetList&& other) = delete; - enum { INPUT_BUTTON_ACCEPT = 1, diff --git a/client/SDL/SDL2/dialogs/sdl_select.cpp b/client/SDL/SDL2/dialogs/sdl_select.cpp index 1a4b90e16..8b603703d 100644 --- a/client/SDL/SDL2/dialogs/sdl_select.cpp +++ b/client/SDL/SDL2/dialogs/sdl_select.cpp @@ -48,6 +48,8 @@ SdlSelectWidget::SdlSelectWidget(SdlSelectWidget&& other) noexcept { } +SdlSelectWidget::~SdlSelectWidget() = default; + bool SdlSelectWidget::set_mouseover(SDL_Renderer* renderer, bool mouseOver) { _mouseover = mouseOver; diff --git a/client/SDL/SDL2/dialogs/sdl_select.hpp b/client/SDL/SDL2/dialogs/sdl_select.hpp index c049a282f..446d02947 100644 --- a/client/SDL/SDL2/dialogs/sdl_select.hpp +++ b/client/SDL/SDL2/dialogs/sdl_select.hpp @@ -30,15 +30,17 @@ class SdlSelectWidget : public SdlWidget public: SdlSelectWidget(SDL_Renderer* renderer, std::string label, SDL_Rect rect); SdlSelectWidget(SdlSelectWidget&& other) noexcept; - ~SdlSelectWidget() override = default; + ~SdlSelectWidget() override; bool set_mouseover(SDL_Renderer* renderer, bool mouseOver); bool set_highlight(SDL_Renderer* renderer, bool highlight); bool update_text(SDL_Renderer* renderer); - private: SdlSelectWidget(const SdlSelectWidget& other) = delete; + SdlSelectWidget& operator=(const SdlSelectWidget& other) = delete; + SdlSelectWidget& operator=(SdlSelectWidget&& other) = delete; + private: std::string _text; bool _mouseover; bool _highlight; diff --git a/client/SDL/SDL2/dialogs/sdl_selectlist.hpp b/client/SDL/SDL2/dialogs/sdl_selectlist.hpp index 8e1432811..5e09db64a 100644 --- a/client/SDL/SDL2/dialogs/sdl_selectlist.hpp +++ b/client/SDL/SDL2/dialogs/sdl_selectlist.hpp @@ -17,10 +17,12 @@ class SdlSelectList int run(); - private: SdlSelectList(const SdlSelectList& other) = delete; SdlSelectList(SdlSelectList&& other) = delete; + SdlSelectList& operator=(const SdlSelectList& other) = delete; + SdlSelectList& operator=(SdlSelectList&& other) = delete; + private: enum { INPUT_BUTTON_ACCEPT = 0, diff --git a/client/SDL/SDL2/dialogs/sdl_widget.hpp b/client/SDL/SDL2/dialogs/sdl_widget.hpp index 0464c08f3..9e22bab74 100644 --- a/client/SDL/SDL2/dialogs/sdl_widget.hpp +++ b/client/SDL/SDL2/dialogs/sdl_widget.hpp @@ -69,9 +69,11 @@ class SdlWidget static bool error_ex(Uint32 res, const char* what, const char* file, size_t line, const char* fkt); - private: SdlWidget(const SdlWidget& other) = delete; + SdlWidget& operator=(const SdlWidget& other) = delete; + SdlWidget& operator=(SdlWidget&& other) = delete; + private: SDL_Texture* render_text(SDL_Renderer* renderer, const std::string& text, SDL_Color fgcolor, SDL_Rect& src, SDL_Rect& dst); SDL_Texture* render_text_wrapped(SDL_Renderer* renderer, const std::string& text, diff --git a/client/SDL/SDL2/sdl_disp.hpp b/client/SDL/SDL2/sdl_disp.hpp index 5341d4e0a..468b2b58f 100644 --- a/client/SDL/SDL2/sdl_disp.hpp +++ b/client/SDL/SDL2/sdl_disp.hpp @@ -31,8 +31,13 @@ class sdlDispContext public: explicit sdlDispContext(SdlContext* sdl); + sdlDispContext(const sdlDispContext& other) = delete; + sdlDispContext(sdlDispContext&& other) = delete; ~sdlDispContext(); + sdlDispContext& operator=(const sdlDispContext& other) = delete; + sdlDispContext& operator=(sdlDispContext&& other) = delete; + BOOL init(DispClientContext* disp); BOOL uninit(DispClientContext* disp); diff --git a/client/SDL/SDL2/sdl_freerdp.hpp b/client/SDL/SDL2/sdl_freerdp.hpp index 6eeca6a45..f082d3214 100644 --- a/client/SDL/SDL2/sdl_freerdp.hpp +++ b/client/SDL/SDL2/sdl_freerdp.hpp @@ -47,6 +47,11 @@ class SdlContext { public: explicit SdlContext(rdpContext* context); + SdlContext(const SdlContext& other) = delete; + SdlContext(SdlContext&& other) = delete; + + SdlContext& operator=(const SdlContext& other) = delete; + SdlContext& operator=(SdlContext&& other) = delete; private: rdpContext* _context; diff --git a/client/SDL/SDL2/sdl_kbd.hpp b/client/SDL/SDL2/sdl_kbd.hpp index f7b343ac5..0103bc453 100644 --- a/client/SDL/SDL2/sdl_kbd.hpp +++ b/client/SDL/SDL2/sdl_kbd.hpp @@ -34,8 +34,13 @@ class sdlInput { public: explicit sdlInput(SdlContext* sdl); + sdlInput(const sdlInput& other) = delete; + sdlInput(sdlInput&& other) = delete; ~sdlInput() = default; + sdlInput& operator=(const sdlInput& other) = delete; + sdlInput& operator=(sdlInput&& other) = delete; + BOOL keyboard_sync_state(); BOOL keyboard_focus_in(); diff --git a/client/SDL/SDL2/sdl_utils.hpp b/client/SDL/SDL2/sdl_utils.hpp index 89754eab1..dd8026750 100644 --- a/client/SDL/SDL2/sdl_utils.hpp +++ b/client/SDL/SDL2/sdl_utils.hpp @@ -30,8 +30,13 @@ class CriticalSection { public: CriticalSection(); + CriticalSection(const CriticalSection& other) = delete; + CriticalSection(CriticalSection&& other) = delete; ~CriticalSection(); + CriticalSection& operator=(const CriticalSection& other) = delete; + CriticalSection& operator=(const CriticalSection&& other) = delete; + void lock(); void unlock(); diff --git a/client/SDL/SDL2/sdl_window.hpp b/client/SDL/SDL2/sdl_window.hpp index 35be5fee9..93f71048c 100644 --- a/client/SDL/SDL2/sdl_window.hpp +++ b/client/SDL/SDL2/sdl_window.hpp @@ -27,9 +27,13 @@ class SdlWindow public: SdlWindow(const std::string& title, Sint32 startupX, Sint32 startupY, Sint32 width, Sint32 height, Uint32 flags); + SdlWindow(const SdlWindow& other) = delete; SdlWindow(SdlWindow&& other) noexcept; ~SdlWindow(); + SdlWindow& operator=(const SdlWindow& other) = delete; + SdlWindow& operator=(SdlWindow&& other) = delete; + [[nodiscard]] Uint32 id() const; [[nodiscard]] int displayIndex() const; [[nodiscard]] SDL_Rect rect() const; @@ -57,6 +61,4 @@ class SdlWindow SDL_Window* _window = nullptr; Sint32 _offset_x = 0; Sint32 _offset_y = 0; - - SdlWindow(const SdlWindow& other) = delete; }; diff --git a/client/SDL/SDL3/dialogs/res/sdl3_resource_manager.hpp b/client/SDL/SDL3/dialogs/res/sdl3_resource_manager.hpp index 7e6f104f6..638435708 100644 --- a/client/SDL/SDL3/dialogs/res/sdl3_resource_manager.hpp +++ b/client/SDL/SDL3/dialogs/res/sdl3_resource_manager.hpp @@ -31,7 +31,7 @@ class SDL3ResourceManager : public SDLResourceManager SDL3ResourceManager(const SDL3ResourceManager& other) = delete; SDL3ResourceManager(const SDL3ResourceManager&& other) = delete; ~SDL3ResourceManager() = delete; - SDL3ResourceManager operator=(const SDL3ResourceManager& other) = delete; + SDL3ResourceManager& operator=(const SDL3ResourceManager& other) = delete; SDL3ResourceManager& operator=(SDL3ResourceManager&& other) = delete; static SDL_IOStream* get(const std::string& type, const std::string& id); diff --git a/client/SDL/SDL3/dialogs/sdl_button.cpp b/client/SDL/SDL3/dialogs/sdl_button.cpp index b640a541d..9c01592cd 100644 --- a/client/SDL/SDL3/dialogs/sdl_button.cpp +++ b/client/SDL/SDL3/dialogs/sdl_button.cpp @@ -41,6 +41,8 @@ SdlButton::SdlButton(SdlButton&& other) noexcept { } +SdlButton::~SdlButton() = default; + bool SdlButton::highlight(SDL_Renderer* renderer) { assert(renderer); diff --git a/client/SDL/SDL3/dialogs/sdl_button.hpp b/client/SDL/SDL3/dialogs/sdl_button.hpp index 668a8fe7d..24bd658e0 100644 --- a/client/SDL/SDL3/dialogs/sdl_button.hpp +++ b/client/SDL/SDL3/dialogs/sdl_button.hpp @@ -9,7 +9,11 @@ class SdlButton : public SdlWidget public: SdlButton(SDL_Renderer* renderer, std::string label, int id, const SDL_FRect& rect); SdlButton(SdlButton&& other) noexcept; - ~SdlButton() override = default; + SdlButton(const SdlButton& other) = delete; + ~SdlButton() override; + + SdlButton& operator=(const SdlButton& other) = delete; + SdlButton& operator=(SdlButton&& other) = delete; bool highlight(SDL_Renderer* renderer); bool mouseover(SDL_Renderer* renderer); @@ -18,8 +22,6 @@ class SdlButton : public SdlWidget [[nodiscard]] int id() const; private: - SdlButton(const SdlButton& other) = delete; - std::string _name; int _id; }; diff --git a/client/SDL/SDL3/dialogs/sdl_buttons.cpp b/client/SDL/SDL3/dialogs/sdl_buttons.cpp index e9f0297ce..d1d5ec3e9 100644 --- a/client/SDL/SDL3/dialogs/sdl_buttons.cpp +++ b/client/SDL/SDL3/dialogs/sdl_buttons.cpp @@ -5,6 +5,8 @@ static const Uint32 hpadding = 10; +SdlButtonList::~SdlButtonList() = default; + bool SdlButtonList::populate(SDL_Renderer* renderer, const std::vector& labels, const std::vector& ids, Sint32 total_width, Sint32 offsetY, Sint32 width, Sint32 height) diff --git a/client/SDL/SDL3/dialogs/sdl_buttons.hpp b/client/SDL/SDL3/dialogs/sdl_buttons.hpp index 379cdae3e..eef1dc3fc 100644 --- a/client/SDL/SDL3/dialogs/sdl_buttons.hpp +++ b/client/SDL/SDL3/dialogs/sdl_buttons.hpp @@ -9,7 +9,12 @@ class SdlButtonList { public: SdlButtonList() = default; - virtual ~SdlButtonList() = default; + SdlButtonList(const SdlButtonList& other) = delete; + SdlButtonList(SdlButtonList&& other) = delete; + virtual ~SdlButtonList(); + + SdlButtonList& operator=(const SdlButtonList& other) = delete; + SdlButtonList& operator=(SdlButtonList&& other) = delete; bool populate(SDL_Renderer* renderer, const std::vector& labels, const std::vector& ids, Sint32 total_width, Sint32 offsetY, Sint32 width, @@ -26,9 +31,6 @@ class SdlButtonList void clear(); private: - SdlButtonList(const SdlButtonList& other) = delete; - SdlButtonList(SdlButtonList&& other) = delete; - std::vector _list; SdlButton* _highlighted = nullptr; size_t _highlight_index = 0; diff --git a/client/SDL/SDL3/dialogs/sdl_connection_dialog.hpp b/client/SDL/SDL3/dialogs/sdl_connection_dialog.hpp index df233c9e7..2c6c6e449 100644 --- a/client/SDL/SDL3/dialogs/sdl_connection_dialog.hpp +++ b/client/SDL/SDL3/dialogs/sdl_connection_dialog.hpp @@ -39,6 +39,9 @@ class SDLConnectionDialog SDLConnectionDialog(const SDLConnectionDialog&& other) = delete; virtual ~SDLConnectionDialog(); + SDLConnectionDialog& operator=(const SDLConnectionDialog& other) = delete; + SDLConnectionDialog& operator=(SDLConnectionDialog& other) = delete; + bool visible() const; bool setTitle(const char* fmt, ...); @@ -113,6 +116,11 @@ class SDLConnectionDialogHider explicit SDLConnectionDialogHider(SDLConnectionDialog* dialog); + SDLConnectionDialogHider(const SDLConnectionDialogHider& other) = delete; + SDLConnectionDialogHider(SDLConnectionDialogHider&& other) = delete; + SDLConnectionDialogHider& operator=(const SDLConnectionDialogHider& other) = delete; + SDLConnectionDialogHider& operator=(SDLConnectionDialogHider& other) = delete; + ~SDLConnectionDialogHider(); private: diff --git a/client/SDL/SDL3/dialogs/sdl_input.hpp b/client/SDL/SDL3/dialogs/sdl_input.hpp index a6b3fbd56..bbb70f027 100644 --- a/client/SDL/SDL3/dialogs/sdl_input.hpp +++ b/client/SDL/SDL3/dialogs/sdl_input.hpp @@ -37,6 +37,10 @@ class SdlInputWidget SdlInputWidget(SDL_Renderer* renderer, std::string label, std::string initial, Uint32 flags, size_t offset, size_t width, size_t height); SdlInputWidget(SdlInputWidget&& other) noexcept; + SdlInputWidget(const SdlInputWidget& other) = delete; + + SdlInputWidget& operator=(const SdlInputWidget& other) = delete; + SdlInputWidget& operator=(SdlInputWidget&& other) = delete; bool fill_label(SDL_Renderer* renderer, SDL_Color color); bool update_label(SDL_Renderer* renderer); @@ -59,8 +63,6 @@ class SdlInputWidget bool update_input(SDL_Renderer* renderer, SDL_Color fgcolor); private: - SdlInputWidget(const SdlInputWidget& other) = delete; - Uint32 _flags; std::string _text; std::string _text_label; diff --git a/client/SDL/SDL3/dialogs/sdl_input_widgets.hpp b/client/SDL/SDL3/dialogs/sdl_input_widgets.hpp index b477d29c9..073294f0c 100644 --- a/client/SDL/SDL3/dialogs/sdl_input_widgets.hpp +++ b/client/SDL/SDL3/dialogs/sdl_input_widgets.hpp @@ -12,8 +12,14 @@ class SdlInputWidgetList public: SdlInputWidgetList(const std::string& title, const std::vector& labels, const std::vector& initial, const std::vector& flags); + SdlInputWidgetList(const SdlInputWidgetList& other) = delete; + SdlInputWidgetList(SdlInputWidgetList&& other) = delete; + virtual ~SdlInputWidgetList(); + SdlInputWidgetList& operator=(const SdlInputWidgetList& other) = delete; + SdlInputWidgetList& operator=(SdlInputWidgetList&& other) = delete; + int run(std::vector& result); protected: @@ -21,9 +27,6 @@ class SdlInputWidgetList ssize_t get_index(const SDL_MouseButtonEvent& button); private: - SdlInputWidgetList(const SdlInputWidgetList& other) = delete; - SdlInputWidgetList(SdlInputWidgetList&& other) = delete; - enum { INPUT_BUTTON_ACCEPT = 1, diff --git a/client/SDL/SDL3/dialogs/sdl_select.hpp b/client/SDL/SDL3/dialogs/sdl_select.hpp index c8179e15f..918dba7c0 100644 --- a/client/SDL/SDL3/dialogs/sdl_select.hpp +++ b/client/SDL/SDL3/dialogs/sdl_select.hpp @@ -30,15 +30,16 @@ class SdlSelectWidget : public SdlWidget public: SdlSelectWidget(SDL_Renderer* renderer, std::string label, const SDL_FRect& rect); SdlSelectWidget(SdlSelectWidget&& other) noexcept; - ~SdlSelectWidget() override = default; + SdlSelectWidget(const SdlSelectWidget& other) = delete; + + SdlSelectWidget& operator=(const SdlSelectWidget& other) = delete; + SdlSelectWidget& operator=(SdlSelectWidget&& other) = delete; bool set_mouseover(SDL_Renderer* renderer, bool mouseOver); bool set_highlight(SDL_Renderer* renderer, bool highlight); bool update_text(SDL_Renderer* renderer); private: - SdlSelectWidget(const SdlSelectWidget& other) = delete; - std::string _text; bool _mouseover; bool _highlight; diff --git a/client/SDL/SDL3/dialogs/sdl_selectlist.hpp b/client/SDL/SDL3/dialogs/sdl_selectlist.hpp index 14a90c990..5d0ebc1f9 100644 --- a/client/SDL/SDL3/dialogs/sdl_selectlist.hpp +++ b/client/SDL/SDL3/dialogs/sdl_selectlist.hpp @@ -13,14 +13,16 @@ class SdlSelectList { public: SdlSelectList(const std::string& title, const std::vector& labels); + SdlSelectList(const SdlSelectList& other) = delete; + SdlSelectList(SdlSelectList&& other) = delete; virtual ~SdlSelectList(); + SdlSelectList& operator=(const SdlSelectList& other) = delete; + SdlSelectList& operator=(SdlSelectList&& other) = delete; + int run(); private: - SdlSelectList(const SdlSelectList& other) = delete; - SdlSelectList(SdlSelectList&& other) = delete; - enum { INPUT_BUTTON_ACCEPT = 0, diff --git a/client/SDL/SDL3/dialogs/sdl_widget.hpp b/client/SDL/SDL3/dialogs/sdl_widget.hpp index bda34ac89..f20392bc8 100644 --- a/client/SDL/SDL3/dialogs/sdl_widget.hpp +++ b/client/SDL/SDL3/dialogs/sdl_widget.hpp @@ -50,9 +50,13 @@ class SdlWidget public: SdlWidget(SDL_Renderer* renderer, const SDL_FRect& rect, bool input); SdlWidget(SDL_Renderer* renderer, const SDL_FRect& rect, SDL_IOStream* ops); + SdlWidget(const SdlWidget& other) = delete; SdlWidget(SdlWidget&& other) noexcept; virtual ~SdlWidget(); + SdlWidget& operator=(const SdlWidget& other) = delete; + SdlWidget& operator=(SdlWidget&& other) = delete; + bool fill(SDL_Renderer* renderer, SDL_Color color); bool fill(SDL_Renderer* renderer, const std::vector& colors); bool update_text(SDL_Renderer* renderer, const std::string& text, SDL_Color fgcolor); @@ -68,8 +72,6 @@ class SdlWidget const char* fkt); private: - SdlWidget(const SdlWidget& other) = delete; - SDL_Texture* render_text(SDL_Renderer* renderer, const std::string& text, SDL_Color fgcolor, SDL_FRect& src, SDL_FRect& dst); SDL_Texture* render_text_wrapped(SDL_Renderer* renderer, const std::string& text, diff --git a/client/SDL/SDL3/sdl_clip.hpp b/client/SDL/SDL3/sdl_clip.hpp index a4af2f47f..9b30b3a1c 100644 --- a/client/SDL/SDL3/sdl_clip.hpp +++ b/client/SDL/SDL3/sdl_clip.hpp @@ -43,6 +43,9 @@ class ClipRequest ClipRequest(ClipRequest&& other) = default; ~ClipRequest() = default; + ClipRequest& operator=(const ClipRequest& other) = delete; + ClipRequest& operator=(ClipRequest&& other) = delete; + [[nodiscard]] uint32_t format() const; [[nodiscard]] std::string formatstr() const; [[nodiscard]] std::string mime() const; diff --git a/client/SDL/SDL3/sdl_disp.hpp b/client/SDL/SDL3/sdl_disp.hpp index 947454be7..cd70d0431 100644 --- a/client/SDL/SDL3/sdl_disp.hpp +++ b/client/SDL/SDL3/sdl_disp.hpp @@ -31,8 +31,13 @@ class sdlDispContext public: explicit sdlDispContext(SdlContext* sdl); + sdlDispContext(const sdlDispContext& other) = delete; + sdlDispContext(sdlDispContext&& other) = delete; ~sdlDispContext(); + sdlDispContext& operator=(const sdlDispContext& other) = delete; + sdlDispContext& operator=(sdlDispContext&& other) = delete; + BOOL init(DispClientContext* disp); BOOL uninit(DispClientContext* disp); diff --git a/client/SDL/SDL3/sdl_freerdp.hpp b/client/SDL/SDL3/sdl_freerdp.hpp index e4cda1835..72e992fea 100644 --- a/client/SDL/SDL3/sdl_freerdp.hpp +++ b/client/SDL/SDL3/sdl_freerdp.hpp @@ -47,6 +47,11 @@ class SdlContext { public: explicit SdlContext(rdpContext* context); + SdlContext(const SdlContext& other) = delete; + SdlContext(SdlContext&& other) = delete; + + SdlContext& operator=(const SdlContext& other) = delete; + SdlContext& operator=(SdlContext&& other) = delete; private: rdpContext* _context; diff --git a/client/SDL/SDL3/sdl_kbd.hpp b/client/SDL/SDL3/sdl_kbd.hpp index a5120e8bd..626f337df 100644 --- a/client/SDL/SDL3/sdl_kbd.hpp +++ b/client/SDL/SDL3/sdl_kbd.hpp @@ -34,8 +34,13 @@ class sdlInput { public: explicit sdlInput(SdlContext* sdl); + sdlInput(const sdlInput& other) = delete; + sdlInput(sdlInput&& other) = delete; ~sdlInput() = default; + sdlInput& operator=(const sdlInput& other) = delete; + sdlInput& operator=(sdlInput&& other) = delete; + BOOL keyboard_sync_state(); BOOL keyboard_focus_in(); diff --git a/client/SDL/SDL3/sdl_utils.hpp b/client/SDL/SDL3/sdl_utils.hpp index 47aad7a6d..e65baedec 100644 --- a/client/SDL/SDL3/sdl_utils.hpp +++ b/client/SDL/SDL3/sdl_utils.hpp @@ -34,8 +34,13 @@ class CriticalSection { public: CriticalSection(); + CriticalSection(const CriticalSection& other) = delete; + CriticalSection(CriticalSection&& other) = delete; ~CriticalSection(); + CriticalSection& operator=(const CriticalSection& other) = delete; + CriticalSection& operator=(CriticalSection&& other) = delete; + void lock(); void unlock(); diff --git a/client/SDL/SDL3/sdl_window.hpp b/client/SDL/SDL3/sdl_window.hpp index 9d4ee616b..ba54497a6 100644 --- a/client/SDL/SDL3/sdl_window.hpp +++ b/client/SDL/SDL3/sdl_window.hpp @@ -28,8 +28,12 @@ class SdlWindow SdlWindow(const std::string& title, Sint32 startupX, Sint32 startupY, Sint32 width, Sint32 height, Uint32 flags); SdlWindow(SdlWindow&& other) noexcept; + SdlWindow(const SdlWindow& other) = delete; ~SdlWindow(); + SdlWindow& operator=(const SdlWindow& other) = delete; + SdlWindow& operator=(SdlWindow&& other) = delete; + [[nodiscard]] Uint32 id() const; [[nodiscard]] int displayIndex() const; [[nodiscard]] SDL_Rect rect() const; @@ -57,6 +61,4 @@ class SdlWindow SDL_Window* _window = nullptr; Sint32 _offset_x = 0; Sint32 _offset_y = 0; - - SdlWindow(const SdlWindow& other) = delete; }; diff --git a/client/SDL/common/res/sdl_resource_file.cpp b/client/SDL/common/res/sdl_resource_file.cpp index c48612d92..53c47c09f 100644 --- a/client/SDL/common/res/sdl_resource_file.cpp +++ b/client/SDL/common/res/sdl_resource_file.cpp @@ -23,3 +23,5 @@ SDLResourceFile::SDLResourceFile(const std::string& type, const std::string& id, { SDLResourceManager::insert(type, id, data); } + +SDLResourceFile::~SDLResourceFile() = default; diff --git a/client/SDL/common/res/sdl_resource_file.hpp b/client/SDL/common/res/sdl_resource_file.hpp index 5846921d1..bc7c819f5 100644 --- a/client/SDL/common/res/sdl_resource_file.hpp +++ b/client/SDL/common/res/sdl_resource_file.hpp @@ -25,9 +25,10 @@ class SDLResourceFile public: SDLResourceFile(const std::string& type, const std::string& id, const std::vector& data); - virtual ~SDLResourceFile() = default; + virtual ~SDLResourceFile(); - private: SDLResourceFile(const SDLResourceFile& other) = delete; SDLResourceFile(const SDLResourceFile&& other) = delete; + SDLResourceFile& operator=(const SDLResourceFile& other) = delete; + SDLResourceFile& operator=(SDLResourceFile&& other) = delete; }; diff --git a/client/SDL/common/scoped_guard.hpp b/client/SDL/common/scoped_guard.hpp index 9a5f43c73..369cf4060 100644 --- a/client/SDL/common/scoped_guard.hpp +++ b/client/SDL/common/scoped_guard.hpp @@ -48,8 +48,8 @@ class ScopeGuard ScopeGuard(const ScopeGuard&) = delete; ScopeGuard(ScopeGuard&& other) noexcept = delete; - auto operator=(const ScopeGuard&) = delete; - auto operator=(const ScopeGuard&&) = delete; + ScopeGuard& operator=(const ScopeGuard&) = delete; + ScopeGuard& operator=(const ScopeGuard&&) = delete; private: std::function f;