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
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ struct RgbColor
static RgbColor YELLOW;
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");