[gtk/master.msvc.fix] gtk/gtkcssrgbavalue.c: Fix build on Visual Studio



commit a46c9bad221b6e085d7498f7c267a5f417b81cbc
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Nov 13 17:14:31 2019 +0800

    gtk/gtkcssrgbavalue.c: Fix build on Visual Studio
    
    Visual Studio does not allow static or global structures to use
    non-constants in their aggregate initializers when set/cast to a type,
    so fix the build by removing such casts.

 gtk/gtkcssrgbavalue.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcssrgbavalue.c b/gtk/gtkcssrgbavalue.c
index a63f2803a3..fda15fddf0 100644
--- a/gtk/gtkcssrgbavalue.c
+++ b/gtk/gtkcssrgbavalue.c
@@ -107,9 +107,9 @@ static const GtkCssValueClass GTK_CSS_VALUE_RGBA = {
   gtk_css_value_rgba_print
 };
 
-static GtkCssValue transparent_black_singleton = (GtkCssValue) { &GTK_CSS_VALUE_RGBA, 1, { 0, 0, 0, 0 }};
-static GtkCssValue transparent_white_singleton = (GtkCssValue) { &GTK_CSS_VALUE_RGBA, 1, { 1, 1, 1, 0 }};
-static GtkCssValue opaque_white_singleton      = (GtkCssValue) { &GTK_CSS_VALUE_RGBA, 1, { 1, 1, 1, 1 }};
+static GtkCssValue transparent_black_singleton = { &GTK_CSS_VALUE_RGBA, 1, { 0, 0, 0, 0 }};
+static GtkCssValue transparent_white_singleton = { &GTK_CSS_VALUE_RGBA, 1, { 1, 1, 1, 0 }};
+static GtkCssValue opaque_white_singleton      = { &GTK_CSS_VALUE_RGBA, 1, { 1, 1, 1, 1 }};
 
 GtkCssValue *
 _gtk_css_rgba_value_new_from_rgba (const GdkRGBA *rgba)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]