From 7dc141827a0f21ea6bf1386f47b8d58cfe7c2a52 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 27 Feb 2015 02:54:58 -0500 Subject: [PATCH] Delete old rgb_color operators that are no longer needed. --- headers/private/interface/ColorTools.h | 26 ------------------- .../icon-o-matic/generic/support/support_ui.h | 23 ---------------- 2 files changed, 49 deletions(-) diff --git a/headers/private/interface/ColorTools.h b/headers/private/interface/ColorTools.h index 279a7d203b..8f7e78e66e 100644 --- a/headers/private/interface/ColorTools.h +++ b/headers/private/interface/ColorTools.h @@ -52,32 +52,6 @@ All rights reserved. namespace BExperimental { -// Comparison operators. - -inline bool operator==(const rgb_color c1, const rgb_color c2) -{ - return (*((uint32*)&c1)) == (*((uint32*)&c2)); -} - -inline bool operator!=(const rgb_color c1, const rgb_color c2) -{ - return (*((uint32*)&c1)) != (*((uint32*)&c2)); -} - -#ifndef __HAIKU__ -// Color creation. - -inline rgb_color make_color(uint8 red, uint8 green, uint8 blue, uint8 alpha=255) -{ - rgb_color c; - c.red = red; - c.green = green; - c.blue = blue; - c.alpha = alpha; - return c; -} -#endif - // Mix two colors together, ignoring their relative alpha channels. // If amount is 0, the result is color1; if 255, the result is color2; // if another value, it is somewhere in-between. The resulting alpha diff --git a/src/apps/icon-o-matic/generic/support/support_ui.h b/src/apps/icon-o-matic/generic/support/support_ui.h index 0865ab2c03..81a2025329 100644 --- a/src/apps/icon-o-matic/generic/support/support_ui.h +++ b/src/apps/icon-o-matic/generic/support/support_ui.h @@ -43,27 +43,4 @@ void print_modifiers(); const char* string_for_color_space(color_space format); void print_color_space(color_space format); - -// Those are already defined in newer versions of BeOS -#if !defined(B_BEOS_VERSION_DANO) && !defined(__HAIKU__) - -// rgb_color == rgb_color -static inline bool -operator==(const rgb_color& a, const rgb_color& b) -{ - return a.red == b.red - && a.green == b.green - && a.blue == b.blue - && a.alpha == b.alpha; -} - -// rgb_color != rgb_color -static inline bool -operator!=(const rgb_color& a, const rgb_color& b) -{ - return !(a == b); -} - -#endif // B_BEOS_VERSION <= ... - #endif // SUPPORT_UI_H