summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2018-06-09 12:59:51 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2018-06-09 12:59:51 +0200
commit0d36c33cb455627b2c6a9aa6ff160738eda3dbe9 (patch)
treeb7ec80e0f55f1f48fa4b3b8da476a4fd610c6a96
parentf602f5ffd6959f4da6de0dd61ea1b60025d12294 (diff)
Fix colour class.
-rw-r--r--plugingui/colour.cc7
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