diff options
author | Robert Bragg <robert@linux.intel.com> | 2013-06-27 18:55:43 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2014-01-01 17:43:06 +0000 |
commit | 7bf4c08dee1ebdea7d672c96ce3143be2c064cc2 (patch) | |
tree | 3d779662fc04f2699719fede8da389c08c450e00 | |
parent | ffde82981f22bd0185a7f33e1e6e1479f4c295b8 (diff) | |
download | cogl-7bf4c08dee1ebdea7d672c96ce3143be2c064cc2.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.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
-rw-r--r-- | cogl/cogl-texture.c | 4 | ||||
-rw-r--r-- | cogl/cogl-texture.h | 4 |
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); /** |