diff --git a/include/llmr/map/settings.hpp b/include/llmr/map/settings.hpp index d7ebb55ed..3b236387b 100644 --- a/include/llmr/map/settings.hpp +++ b/include/llmr/map/settings.hpp @@ -7,6 +7,13 @@ class settings { public: virtual void save() = 0; + // Make noncopyable + settings() = default; + settings(const settings&) = delete; + settings(const settings&&) = delete; + settings &operator=(const settings&) = delete; + settings &operator=(const settings&&) = delete; + public: // position double longitude = 0; diff --git a/include/llmr/map/tile.hpp b/include/llmr/map/tile.hpp index 851b95553..69ff62c54 100644 --- a/include/llmr/map/tile.hpp +++ b/include/llmr/map/tile.hpp @@ -27,6 +27,13 @@ public: tile(tile_id id); ~tile(); + // Make noncopyable + tile(const tile&) = delete; + tile(const tile&&) = delete; + tile &operator=(const tile&) = delete; + tile &operator=(const tile&&) = delete; + + // Other functions void setData(uint8_t *data, uint32_t bytes); bool parse(); void parseLayer(const uint8_t *data, uint32_t bytes); diff --git a/include/llmr/map/transform.hpp b/include/llmr/map/transform.hpp index 62b1b1fa0..2f78b0775 100644 --- a/include/llmr/map/transform.hpp +++ b/include/llmr/map/transform.hpp @@ -18,6 +18,12 @@ class transform { public: transform(); + // Make noncopyable + transform(const transform&) = delete; + transform(const transform&&) = delete; + transform &operator=(const transform&) = delete; + transform &operator=(const transform&&) = delete; + // Animations bool needsAnimation() const; void updateAnimations(); diff --git a/include/llmr/renderer/painter.hpp b/include/llmr/renderer/painter.hpp index d6997940c..9a16a2ee4 100644 --- a/include/llmr/renderer/painter.hpp +++ b/include/llmr/renderer/painter.hpp @@ -14,6 +14,13 @@ class painter { public: painter(class transform *transform, class settings *settings); + // Make noncopyable + painter(const painter&) = delete; + painter(const painter&&) = delete; + painter &operator=(const painter&) = delete; + painter &operator=(const painter&&) = delete; + + void setup(); void teardown(); diff --git a/include/llmr/renderer/shader.hpp b/include/llmr/renderer/shader.hpp index 223c412c3..2f2e06c33 100644 --- a/include/llmr/renderer/shader.hpp +++ b/include/llmr/renderer/shader.hpp @@ -9,6 +9,13 @@ class Shader { public: Shader(const char *vertex, const char *fragment); ~Shader(); + + // Make noncopyable + Shader(const Shader&) = delete; + Shader(const Shader&&) = delete; + Shader &operator=(const Shader&) = delete; + Shader &operator=(const Shader&&) = delete; + bool valid; uint32_t program; std::forward_list attributes; diff --git a/include/llmr/util/animation.hpp b/include/llmr/util/animation.hpp index bb5261440..c31f1ff9d 100644 --- a/include/llmr/util/animation.hpp +++ b/include/llmr/util/animation.hpp @@ -12,9 +12,12 @@ public: }; animation(double from, double to, double &value, double duration); - animation(const animation &) = delete; - animation(const animation &&) = delete; - animation &operator=(const animation &) = delete; + + // Make noncopyable + animation(const animation&) = delete; + animation(const animation&&) = delete; + animation &operator=(const animation&) = delete; + animation &operator=(const animation&&) = delete; state update() const;