hrev46946 adds 1 changeset to branch 'master' old head: 5006aac2722f9f671997c54f0d1b713ef50a9586 new head: 8cdefee93f28b56f2a7790464eeea52cc246988c overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=8cdefee+%5E5006aac ---------------------------------------------------------------------------- 8cdefee: 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. [ John Scipione <jscipione@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev46946 Commit: 8cdefee93f28b56f2a7790464eeea52cc246988c URL: http://cgit.haiku-os.org/haiku/commit/?id=8cdefee Author: John Scipione <jscipione@xxxxxxxxx> Date: Thu Feb 27 00:24:16 2014 UTC ---------------------------------------------------------------------------- 1 file changed, 4 insertions(+), 2 deletions(-) src/preferences/screensaver/PreviewView.cpp | 6 ++++-- ---------------------------------------------------------------------------- diff --git a/src/preferences/screensaver/PreviewView.cpp b/src/preferences/screensaver/PreviewView.cpp index fe4b09d..3e6ad9b 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);