Added comparison operator to RgbColor.

This commit is contained in:
T. van der Zwan 2013-08-21 14:09:40 +00:00
parent b66c397a46
commit 5010b9ce8e

View File

@ -21,6 +21,10 @@ struct RgbColor
static RgbColor YELLOW; static RgbColor YELLOW;
static RgbColor WHITE; static RgbColor WHITE;
inline bool operator==(const RgbColor& other) const
{
return red == other.red && green == other.green && blue == other.blue;
}
}; };
static_assert(sizeof(RgbColor) == 3, "Incorrect size of RgbColor"); static_assert(sizeof(RgbColor) == 3, "Incorrect size of RgbColor");