From 32a227ce77708d043317da0036624c11c680b48c Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 17 Sep 2015 18:45:53 +0200 Subject: [PATCH] os: Add == and != operators to Genode::Color --- repos/os/include/util/color.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repos/os/include/util/color.h b/repos/os/include/util/color.h index 82923e8d94..ffb8135e16 100644 --- a/repos/os/include/util/color.h +++ b/repos/os/include/util/color.h @@ -34,6 +34,12 @@ struct Genode::Color : r(red), g(green), b(blue), a(alpha) { } Color(): r(0), g(0), b(0), a(0) { } + + bool operator == (Color const &other) const { + return other.r == r && other.g == g && other.b == b; } + + bool operator != (Color const &other) const { + return !operator == (other); } };