From 098521096905e8bb8c5ef0f88ed147f5a199b660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Tue, 29 Mar 2005 16:30:46 +0000 Subject: [PATCH] added this very useful compare function git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12122 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/os/interface/GraphicsDefs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/headers/os/interface/GraphicsDefs.h b/headers/os/interface/GraphicsDefs.h index 30d1fc619d..b3c9a727df 100644 --- a/headers/os/interface/GraphicsDefs.h +++ b/headers/os/interface/GraphicsDefs.h @@ -49,6 +49,16 @@ typedef struct pattern { uint8 data[8]; } pattern; +#ifdef __cplusplus + +inline bool +operator==(const pattern& a, const pattern& b) +{ + return (*(uint64*)a.data == *(uint64*)b.data); +} + +#endif // __cplusplus + extern _IMPEXP_BE const pattern B_SOLID_HIGH; extern _IMPEXP_BE const pattern B_MIXED_COLORS; extern _IMPEXP_BE const pattern B_SOLID_LOW;