From 8cdefee93f28b56f2a7790464eeea52cc246988c Mon Sep 17 00:00:00 2001 From: John Scipione Date: Wed, 26 Feb 2014 19:24:16 -0500 Subject: [PATCH] ScreenSaver: fix gcc4 x86 and x86_64 builds Create a static const variable to take the address of instead of taking the addess of a temporary. --- src/preferences/screensaver/PreviewView.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/preferences/screensaver/PreviewView.cpp b/src/preferences/screensaver/PreviewView.cpp index fe4b09dfb4..3e6ad9b2ee 100644 --- a/src/preferences/screensaver/PreviewView.cpp +++ b/src/preferences/screensaver/PreviewView.cpp @@ -21,6 +21,9 @@ #include "Utility.h" +static const rgb_color kWhite = (rgb_color){ 255, 255, 255 }; + + #undef B_TRANSLATION_CONTEXT #define B_TRANSLATION_CONTEXT "PreviewView" @@ -117,8 +120,7 @@ PreviewView::AddPreview() B_WILL_DRAW); fNoPreview->SetViewColor(0, 0, 0); fNoPreview->SetLowColor(0, 0, 0); - fNoPreview->SetFontAndColor(be_plain_font, B_FONT_ALL, - &(rgb_color){ 255, 255, 255 }); + fNoPreview->SetFontAndColor(be_plain_font, B_FONT_ALL, &kWhite); fNoPreview->SetText(B_TRANSLATE("No preview available")); fNoPreview->SetAlignment(B_ALIGN_CENTER); fNoPreview->MakeEditable(false);