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.
This commit is contained in:
John Scipione
2014-02-26 19:24:54 -05:00
parent 5006aac272
commit 8cdefee93f
+4 -2
View File
@@ -21,6 +21,9 @@
#include "Utility.h" #include "Utility.h"
static const rgb_color kWhite = (rgb_color){ 255, 255, 255 };
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "PreviewView" #define B_TRANSLATION_CONTEXT "PreviewView"
@@ -117,8 +120,7 @@ PreviewView::AddPreview()
B_WILL_DRAW); B_WILL_DRAW);
fNoPreview->SetViewColor(0, 0, 0); fNoPreview->SetViewColor(0, 0, 0);
fNoPreview->SetLowColor(0, 0, 0); fNoPreview->SetLowColor(0, 0, 0);
fNoPreview->SetFontAndColor(be_plain_font, B_FONT_ALL, fNoPreview->SetFontAndColor(be_plain_font, B_FONT_ALL, &kWhite);
&(rgb_color){ 255, 255, 255 });
fNoPreview->SetText(B_TRANSLATE("No preview available")); fNoPreview->SetText(B_TRANSLATE("No preview available"));
fNoPreview->SetAlignment(B_ALIGN_CENTER); fNoPreview->SetAlignment(B_ALIGN_CENTER);
fNoPreview->MakeEditable(false); fNoPreview->MakeEditable(false);