diff options
author | André Nusser <andre.nusser@googlemail.com> | 2018-06-09 12:59:51 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2018-06-09 12:59:51 +0200 |
commit | 0d36c33cb455627b2c6a9aa6ff160738eda3dbe9 (patch) | |
tree | b7ec80e0f55f1f48fa4b3b8da476a4fd610c6a96 /plugingui | |
parent | f602f5ffd6959f4da6de0dd61ea1b60025d12294 (diff) |
Fix colour class.
Diffstat (limited to 'plugingui')
-rw-r--r-- | plugingui/colour.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/plugingui/colour.cc b/plugingui/colour.cc index 9abe7eb..70aa562 100644 --- a/plugingui/colour.cc +++ b/plugingui/colour.cc @@ -32,17 +32,17 @@ namespace GUI { Colour::Colour() { - data = {1.0f, 1.0f, 1.0f, 1.0f}; + data = {{1.0f, 1.0f, 1.0f, 1.0f}}; } Colour::Colour(float grey, float a) { - data = {grey, grey, grey, a}; + data = {{grey, grey, grey, a}}; } Colour::Colour(float r, float g, float b, float a) { - data = {r, g, b, a}; + data = {{r, g, b, a}}; } Colour::Colour(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a) @@ -57,6 +57,7 @@ Colour::Colour(const Colour& other) Colour& Colour::operator=(const Colour& other) { data = other.data; + return *this; } bool Colour::operator==(const Colour& other) const |