[cogl] Make cogl_color_init_from_4fv take a const array



commit 87c02670107f00008611cbb0a8cfc97c8b6ea956
Author: Neil Roberts <neil linux intel com>
Date:   Fri Oct 19 17:21:35 2012 +0100

    Make cogl_color_init_from_4fv take a const array
    
    The passed in array isn't written to so it's more convenient to use if
    it is const.
    
    Reviewed-by: Robert Bragg <robert linux intel com>

 cogl/cogl-color.c |    2 +-
 cogl/cogl-color.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl-color.c b/cogl/cogl-color.c
index 0919a75..9ed1e15 100644
--- a/cogl/cogl-color.c
+++ b/cogl/cogl-color.c
@@ -60,7 +60,7 @@ cogl_color_init_from_4f (CoglColor *color,
 
 void
 cogl_color_init_from_4fv (CoglColor *color,
-                          float *color_array)
+                          const float *color_array)
 {
   memcpy (color, color_array, sizeof (CoglColor));
 }
diff --git a/cogl/cogl-color.h b/cogl/cogl-color.h
index 0a2e3ff..3c2dd66 100644
--- a/cogl/cogl-color.h
+++ b/cogl/cogl-color.h
@@ -91,7 +91,7 @@ cogl_color_init_from_4f (CoglColor *color,
  */
 void
 cogl_color_init_from_4fv (CoglColor *color,
-                          float *color_array);
+                          const float *color_array);
 
 /**
  * cogl_color_get_red_byte:



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