summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2013-06-27 18:55:43 +0100
committerRobert Bragg <robert@linux.intel.com>2013-12-02 15:34:00 +0000
commit021a44dd6020b4f4df911931b78a96e4ff504fdf (patch)
treea1e1e85a39641c52c11bccf683e2fb8f4e9f62aa
parent0f1167ba98d1a9831873ac701991e43572db465c (diff)
downloadcogl-021a44dd6020b4f4df911931b78a96e4ff504fdf.tar.gz
texture: return ints from _get_width/height
This changes cogl_texture_get_width/height to return signed integers just because unsigned integers in C often cause un-obvious arithmetic issues due to implicit casting.
-rw-r--r--cogl/cogl-texture.c4
-rw-r--r--cogl/cogl-texture.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c
index a2df38d7..6bc67c2c 100644
--- a/cogl/cogl-texture.c
+++ b/cogl/cogl-texture.c
@@ -170,13 +170,13 @@ _cogl_texture_is_foreign (CoglTexture *texture)
return FALSE;
}
-unsigned int
+int
cogl_texture_get_width (CoglTexture *texture)
{
return texture->width;
}
-unsigned int
+int
cogl_texture_get_height (CoglTexture *texture)
{
return texture->height;
diff --git a/cogl/cogl-texture.h b/cogl/cogl-texture.h
index 308eaa35..9c3d1934 100644
--- a/cogl/cogl-texture.h
+++ b/cogl/cogl-texture.h
@@ -132,7 +132,7 @@ cogl_is_texture (void *object);
*
* Return value: the width of the GPU side texture in pixels
*/
-unsigned int
+int
cogl_texture_get_width (CoglTexture *texture);
/**
@@ -143,7 +143,7 @@ cogl_texture_get_width (CoglTexture *texture);
*
* Return value: the height of the GPU side texture in pixels
*/
-unsigned int
+int
cogl_texture_get_height (CoglTexture *texture);
/**