make objects noncopyable
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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<uint32_t> attributes;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user