replaced get_uint32_color() by casting into a reference (const uint32 &)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17547 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Marcus Overhagen
2006-05-22 20:14:26 +00:00
parent 548cead6a1
commit df230cb528
+3 -14
View File
@@ -91,17 +91,6 @@ static property_info sViewPropInfo[] = {
};
// General Functions
//------------------------------------------------------------------------------
static inline uint32
get_uint32_color(rgb_color color)
{
return *(uint32 *)&color;
}
// #pragma mark -
@@ -469,13 +458,13 @@ BView::Archive(BMessage *data, bool deep) const
// colors
if (ret == B_OK && fState->archiving_flags & B_VIEW_HIGH_COLOR_BIT)
ret = data->AddInt32("_color", get_uint32_color(HighColor()));
ret = data->AddInt32("_color", (const uint32 &)HighColor());
if (ret == B_OK && fState->archiving_flags & B_VIEW_LOW_COLOR_BIT)
ret = data->AddInt32("_color", get_uint32_color(LowColor()));
ret = data->AddInt32("_color", (const uint32 &)LowColor());
if (ret == B_OK && fState->archiving_flags & B_VIEW_VIEW_COLOR_BIT)
ret = data->AddInt32("_color", get_uint32_color(ViewColor()));
ret = data->AddInt32("_color", (const uint32 &)ViewColor());
// NOTE: we do not use this flag any more
// if ( 1 ){