From 5010b9ce8e6085ed868a1022abac0c9ef2049f51 Mon Sep 17 00:00:00 2001 From: "T. van der Zwan" Date: Wed, 21 Aug 2013 14:09:40 +0000 Subject: [PATCH] Added comparison operator to RgbColor. --- include/utils/RgbColor.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/utils/RgbColor.h b/include/utils/RgbColor.h index 50825431..e7c0eccb 100644 --- a/include/utils/RgbColor.h +++ b/include/utils/RgbColor.h @@ -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");