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:
@@ -60,6 +60,22 @@ typedef struct rgb_color {
|
|||||||
uint8 green;
|
uint8 green;
|
||||||
uint8 blue;
|
uint8 blue;
|
||||||
uint8 alpha;
|
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;
|
} rgb_color;
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user