[cogl/wip/rig: 15/33] bitmap: avoid unsigned int
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/rig: 15/33] bitmap: avoid unsigned int
- Date: Mon, 23 Feb 2015 21:35:33 +0000 (UTC)
commit 99d726a8641b4ef2b87ae5716f2c6681eab6b131
Author: Robert Bragg <robert bragg intel com>
Date: Mon Mar 17 15:14:07 2014 +0000
bitmap: avoid unsigned int
We generally avoid using the unsigned int C type in the Cogl api due to
the trouble that it can lead to due to C's implicit casting rules.
cogl/cogl-bitmap-private.h | 4 ++--
cogl/cogl-bitmap.c | 10 +++++-----
cogl/cogl-bitmap.h | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/cogl/cogl-bitmap-private.h b/cogl/cogl-bitmap-private.h
index 4041162..65b806e 100644
--- a/cogl/cogl-bitmap-private.h
+++ b/cogl/cogl-bitmap-private.h
@@ -88,8 +88,8 @@ struct _CoglBitmap
*/
CoglBitmap *
_cogl_bitmap_new_with_malloc_buffer (CoglContext *context,
- unsigned int width,
- unsigned int height,
+ int width,
+ int height,
CoglPixelFormat format,
CoglError **error);
diff --git a/cogl/cogl-bitmap.c b/cogl/cogl-bitmap.c
index 0002473..a4b2b50 100644
--- a/cogl/cogl-bitmap.c
+++ b/cogl/cogl-bitmap.c
@@ -206,8 +206,8 @@ cogl_bitmap_new_for_data (CoglContext *context,
CoglBitmap *
_cogl_bitmap_new_with_malloc_buffer (CoglContext *context,
- unsigned int width,
- unsigned int height,
+ int width,
+ int height,
CoglPixelFormat format,
CoglError **error)
{
@@ -296,13 +296,13 @@ cogl_bitmap_new_from_buffer (CoglBuffer *buffer,
CoglBitmap *
cogl_bitmap_new_with_size (CoglContext *context,
- unsigned int width,
- unsigned int height,
+ int width,
+ int height,
CoglPixelFormat format)
{
CoglPixelBuffer *pixel_buffer;
CoglBitmap *bitmap;
- unsigned int rowstride;
+ int rowstride;
/* creating a buffer to store "any" format does not make sense */
_COGL_RETURN_VAL_IF_FAIL (format != COGL_PIXEL_FORMAT_ANY, NULL);
diff --git a/cogl/cogl-bitmap.h b/cogl/cogl-bitmap.h
index d8c066d..4194364 100644
--- a/cogl/cogl-bitmap.h
+++ b/cogl/cogl-bitmap.h
@@ -160,8 +160,8 @@ cogl_bitmap_new_from_buffer (CoglBuffer *buffer,
*/
CoglBitmap *
cogl_bitmap_new_with_size (CoglContext *context,
- unsigned int width,
- unsigned int height,
+ int width,
+ int height,
CoglPixelFormat format);
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]