[client,sdl] fix constructor and keyword consistency

This commit is contained in:
Armin Novak
2025-03-19 16:33:03 +01:00
committed by akallabeth
parent 0a0248ebe2
commit 9a1f455e02
13 changed files with 30 additions and 13 deletions

View File

@@ -118,7 +118,7 @@ class SDLConnectionDialogHider
SDLConnectionDialogHider(const SDLConnectionDialogHider& other) = delete;
SDLConnectionDialogHider(SDLConnectionDialogHider&& other) = delete;
SDLConnectionDialogHider& operator=(const SDLConnectionDialogHider& other) = delete;
SDLConnectionDialogHider& operator=(SDLConnectionDialogHider& other) = delete;
SDLConnectionDialogHider& operator=(SDLConnectionDialogHider&& other) = delete;
~SDLConnectionDialogHider();

View File

@@ -38,6 +38,7 @@ class SdlInputWidget
size_t offset, size_t width, size_t height);
SdlInputWidget(SdlInputWidget&& other) noexcept;
SdlInputWidget(const SdlInputWidget& other) = delete;
~SdlInputWidget() = default;
SdlInputWidget& operator=(const SdlInputWidget& other) = delete;
SdlInputWidget& operator=(SdlInputWidget&& other) = delete;

View File

@@ -49,6 +49,7 @@ class SdlContext
explicit SdlContext(rdpContext* context);
SdlContext(const SdlContext& other) = delete;
SdlContext(SdlContext&& other) = delete;
~SdlContext() = default;
SdlContext& operator=(const SdlContext& other) = delete;
SdlContext& operator=(SdlContext&& other) = delete;

View File

@@ -40,7 +40,7 @@ class SDLConnectionDialog
virtual ~SDLConnectionDialog();
SDLConnectionDialog& operator=(const SDLConnectionDialog& other) = delete;
SDLConnectionDialog& operator=(SDLConnectionDialog& other) = delete;
SDLConnectionDialog& operator=(SDLConnectionDialog&& other) = delete;
bool visible() const;
@@ -119,7 +119,7 @@ class SDLConnectionDialogHider
SDLConnectionDialogHider(const SDLConnectionDialogHider& other) = delete;
SDLConnectionDialogHider(SDLConnectionDialogHider&& other) = delete;
SDLConnectionDialogHider& operator=(const SDLConnectionDialogHider& other) = delete;
SDLConnectionDialogHider& operator=(SDLConnectionDialogHider& other) = delete;
SDLConnectionDialogHider& operator=(SDLConnectionDialogHider&& other) = delete;
~SDLConnectionDialogHider();

View File

@@ -38,6 +38,7 @@ class SdlInputWidget
size_t offset, size_t width, size_t height);
SdlInputWidget(SdlInputWidget&& other) noexcept;
SdlInputWidget(const SdlInputWidget& other) = delete;
~SdlInputWidget() = default;
SdlInputWidget& operator=(const SdlInputWidget& other) = delete;
SdlInputWidget& operator=(SdlInputWidget&& other) = delete;

View File

@@ -31,6 +31,7 @@ class SdlSelectWidget : public SdlWidget
SdlSelectWidget(SDL_Renderer* renderer, std::string label, const SDL_FRect& rect);
SdlSelectWidget(SdlSelectWidget&& other) noexcept;
SdlSelectWidget(const SdlSelectWidget& other) = delete;
~SdlSelectWidget() override = default;
SdlSelectWidget& operator=(const SdlSelectWidget& other) = delete;
SdlSelectWidget& operator=(SdlSelectWidget&& other) = delete;

View File

@@ -91,6 +91,12 @@ class sdlClip
explicit sdlClip(SdlContext* sdl);
virtual ~sdlClip();
sdlClip(const sdlClip&) = delete;
sdlClip(sdlClip&&) = delete;
sdlClip& operator=(const sdlClip&) = delete;
sdlClip& operator=(sdlClip&&) = delete;
BOOL init(CliprdrClientContext* clip);
BOOL uninit(CliprdrClientContext* clip);

View File

@@ -49,6 +49,7 @@ class SdlContext
explicit SdlContext(rdpContext* context);
SdlContext(const SdlContext& other) = delete;
SdlContext(SdlContext&& other) = delete;
~SdlContext() = default;
SdlContext& operator=(const SdlContext& other) = delete;
SdlContext& operator=(SdlContext&& other) = delete;

View File

@@ -32,7 +32,6 @@
#include <freerdp/scancode.h>
#include <freerdp/log.h>
#define TAG CLIENT_TAG("SDL.kbd")
typedef struct
{

View File

@@ -9,17 +9,17 @@
#include <vector>
#include "@CLASSNAME@.hpp"
std::string @CLASSNAME@::name() {
std::string @CLASSNAME@::name() noexcept {
return "@FILENAME@";
}
std::string @CLASSNAME@::type() {
std::string @CLASSNAME@::type() noexcept {
return "@CLASSTYPE@";
}
// NOLINTNEXTLINE(clang-diagnostic-global-constructors)
const SDLResourceFile @CLASSNAME@::_initializer(type(), name(), init());
std::vector<unsigned char> @CLASSNAME@::init() {
std::vector<unsigned char> @CLASSNAME@::init() noexcept {
static const unsigned char data[] = {
@FILEDATA@
};

View File

@@ -17,11 +17,18 @@ class @CLASSNAME@
public:
@CLASSNAME@() = delete;
~@CLASSNAME@() = delete;
@CLASSNAME@(const @CLASSNAME@&) = delete;
@CLASSNAME@(@CLASSNAME@&&) = delete;
static std::string name();
static std::string type();
@CLASSNAME@& operator=(const @CLASSNAME@&) = delete;
@CLASSNAME@& operator=(@CLASSNAME@&&) = delete;
static std::string name() noexcept;
static std::string type() noexcept;
protected:
static std::vector<unsigned char> init();
static std::vector<unsigned char> init() noexcept;
static const SDLResourceFile _initializer;
};

View File

@@ -19,7 +19,7 @@
#include "sdl_resource_manager.hpp"
SDLResourceFile::SDLResourceFile(const std::string& type, const std::string& id,
const std::vector<unsigned char>& data)
const std::vector<unsigned char>& data) noexcept
{
SDLResourceManager::insert(type, id, data);
}

View File

@@ -24,11 +24,11 @@ class SDLResourceFile
{
public:
SDLResourceFile(const std::string& type, const std::string& id,
const std::vector<unsigned char>& data);
const std::vector<unsigned char>& data) noexcept;
virtual ~SDLResourceFile();
SDLResourceFile(const SDLResourceFile& other) = delete;
SDLResourceFile(const SDLResourceFile&& other) = delete;
SDLResourceFile(SDLResourceFile&& other) = delete;
SDLResourceFile& operator=(const SDLResourceFile& other) = delete;
SDLResourceFile& operator=(SDLResourceFile&& other) = delete;
};