summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2012-10-19 17:21:35 +0100
committerNeil Roberts <neil@linux.intel.com>2012-10-19 17:21:35 +0100
commit87c02670107f00008611cbb0a8cfc97c8b6ea956 (patch)
tree84660f0ccfa7abd611f068245ba48307fadaea15
parentaee7c4d0b9546312c8f44a54f93f6f3f4b9a46f9 (diff)
downloadcogl-87c02670107f00008611cbb0a8cfc97c8b6ea956.tar.gz
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>
-rw-r--r--cogl/cogl-color.c2
-rw-r--r--cogl/cogl-color.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/cogl/cogl-color.c b/cogl/cogl-color.c
index 0919a750..9ed1e150 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 0a2e3ff2..3c2dd669 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: