[gnome-games] chess: Compile with latest vala



commit cdf59d494f473479a354bcfd4e835fe44937eb4e
Author: Robert Ancell <robert ancell canonical com>
Date:   Tue Jan 25 15:00:15 2011 +1000

    chess: Compile with latest vala

 glchess/src/chess-view-3d.vala |    2 +-
 glchess/src/glchess.vala       |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/glchess/src/chess-view-3d.vala b/glchess/src/chess-view-3d.vala
index 10d293e..38d1bb9 100644
--- a/glchess/src/chess-view-3d.vala
+++ b/glchess/src/chess-view-3d.vala
@@ -444,7 +444,7 @@ private class ChessView3D : ChessView
                     glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, black_piece_color);
                     glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, black_piece_specular);
                 }
-                GLfloat black[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
+                const GLfloat black[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
                 glMaterialfv (GL_FRONT_AND_BACK, GL_EMISSION, black);
                 glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, 64.0f);
 
diff --git a/glchess/src/glchess.vala b/glchess/src/glchess.vala
index 360d8fe..b89b8b9 100644
--- a/glchess/src/glchess.vala
+++ b/glchess/src/glchess.vala
@@ -760,8 +760,8 @@ public class Application
     [CCode (cname = "G_MODULE_EXPORT white_time_draw_cb", instance_pos = -1)]
     public bool white_time_draw_cb (Gtk.Widget widget, Cairo.Context c)
     {
-        double fg[3] = { 0.0, 0.0, 0.0 };
-        double bg[3] = { 1.0, 1.0, 1.0 };
+        const double fg[3] = { 0.0, 0.0, 0.0 };
+        const double bg[3] = { 1.0, 1.0, 1.0 };
 
         draw_time (widget, c, make_clock_text (game.clock, Color.WHITE), fg, bg);
         return false;
@@ -770,8 +770,8 @@ public class Application
     [CCode (cname = "G_MODULE_EXPORT black_time_draw_cb", instance_pos = -1)]
     public bool black_time_draw_cb (Gtk.Widget widget, Cairo.Context c)
     {
-        double fg[3] = { 1.0, 1.0, 1.0 };
-        double bg[3] = { 0.0, 0.0, 0.0 };
+        const double fg[3] = { 1.0, 1.0, 1.0 };
+        const double bg[3] = { 0.0, 0.0, 0.0 };
 
         draw_time (widget, c, make_clock_text (game.clock, Color.BLACK), fg, bg);
         return false;



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