Delete old rgb_color operators that are no longer needed.
This commit is contained in:
parent
ba155ed840
commit
7dc141827a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue