Added rgb_color == and != operators - inline only.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10742 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-01-15 02:38:52 +00:00
parent d7e274c031
commit 9551dd1cd3

View File

@ -60,6 +60,22 @@ typedef struct rgb_color {
uint8 green;
uint8 blue;
uint8 alpha;
#if defined(__cplusplus)
// some convenient additions
inline bool
operator==(const rgb_color& other) const
{
return *(const uint32 *)this == *(const uint32 *)&other;
}
inline bool
operator!=(const rgb_color& other) const
{
return *(const uint32 *)this != *(const uint32 *)&other;
}
#endif
} rgb_color;
//------------------------------------------------------------------------------