[Cogl] [PATCH 2/2] Make cogl_color_init_from_4fv take a const array
Neil Roberts
neil at linux.intel.com
Fri Oct 19 09:24:38 PDT 2012
The passed in array isn't written to so it's more convenient to use if
it is const.
---
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:
--
1.7.11.3.g3c3efa5
More information about the Cogl
mailing list