[client,sdl] add assignmen and move operator delete

This commit is contained in:
akallabeth 2024-05-16 20:49:51 +02:00
parent 00e4fc267a
commit ff772084e6
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 21 additions and 5 deletions

View File

@ -27,5 +27,12 @@
class SDL2ResourceManager : public SDLResourceManager class SDL2ResourceManager : public SDLResourceManager
{ {
public: public:
SDL2ResourceManager() = delete;
SDL2ResourceManager(const SDL2ResourceManager& other) = delete;
SDL2ResourceManager(const SDL2ResourceManager&& other) = delete;
~SDL2ResourceManager() = delete;
SDL2ResourceManager operator=(const SDL2ResourceManager& other) = delete;
SDL2ResourceManager& operator=(SDL2ResourceManager&& other) = delete;
static SDL_RWops* get(const std::string& type, const std::string& id); static SDL_RWops* get(const std::string& type, const std::string& id);
}; };

View File

@ -27,5 +27,12 @@
class SDL3ResourceManager : public SDLResourceManager class SDL3ResourceManager : public SDLResourceManager
{ {
public: public:
SDL3ResourceManager() = delete;
SDL3ResourceManager(const SDL3ResourceManager& other) = delete;
SDL3ResourceManager(const SDL3ResourceManager&& other) = delete;
~SDL3ResourceManager() = delete;
SDL3ResourceManager operator=(const SDL3ResourceManager& other) = delete;
SDL3ResourceManager& operator=(SDL3ResourceManager&& other) = delete;
static SDL_IOStream* get(const std::string& type, const std::string& id); static SDL_IOStream* get(const std::string& type, const std::string& id);
}; };

View File

@ -26,6 +26,13 @@ class SDLResourceManager
friend class SDLResourceFile; friend class SDLResourceFile;
public: public:
SDLResourceManager() = delete;
SDLResourceManager(const SDLResourceManager& other) = delete;
SDLResourceManager(const SDLResourceManager&& other) = delete;
~SDLResourceManager() = delete;
SDLResourceManager operator=(const SDLResourceManager& other) = delete;
SDLResourceManager& operator=(SDLResourceManager&& other) = delete;
static const std::string typeFonts(); static const std::string typeFonts();
static const std::string typeImages(); static const std::string typeImages();
@ -39,10 +46,5 @@ class SDLResourceManager
static bool useCompiledResources(); static bool useCompiledResources();
private: private:
SDLResourceManager() = delete;
SDLResourceManager(const SDLResourceManager& other) = delete;
SDLResourceManager(const SDLResourceManager&& other) = delete;
~SDLResourceManager() = delete;
static std::map<std::string, std::vector<unsigned char>>& resources(); static std::map<std::string, std::vector<unsigned char>>& resources();
}; };