summaryrefslogtreecommitdiff
path: root/plugingui/colour.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2018-06-09 12:46:09 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2018-06-09 12:51:08 +0200
commitf602f5ffd6959f4da6de0dd61ea1b60025d12294 (patch)
tree7f06de633263c23a87d0278a93825d85fcb9c1f6 /plugingui/colour.h
parent21554166b294470ac593a1a90c82d1b4fe75c61e (diff)
Refactor Colour.
Diffstat (limited to 'plugingui/colour.h')
-rw-r--r--plugingui/colour.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugingui/colour.h b/plugingui/colour.h
index 26f424c..3a135fc 100644
--- a/plugingui/colour.h
+++ b/plugingui/colour.h
@@ -26,6 +26,7 @@
*/
#pragma once
+#include <array>
#include <cstdint>
namespace GUI
@@ -37,12 +38,12 @@ public:
Colour(float grey, float alpha = 1.0f);
Colour(float red, float green, float blue, float alpha = 1.0f);
Colour(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a);
- Colour(Colour&& other);
Colour(const Colour& other);
- ~Colour();
Colour& operator=(const Colour& other);
- Colour& operator=(Colour&& other);
+
+ bool operator==(const Colour& other) const;
+ bool operator!=(const Colour& other) const;
inline float red() const { return data[0]; }
inline float green() const { return data[1]; }
@@ -50,7 +51,7 @@ public:
inline float alpha() const { return data[3]; }
private:
- float *data{nullptr};
+ std::array<float, 4> data;
};
} // GUI::