[gimp] libgimpwidgets: add const qualifiers
- From: Sven Neumann <neo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets: add const qualifiers
- Date: Sun, 26 Sep 2010 20:27:30 +0000 (UTC)
commit 8f9ffe597d39898c82061b9edd5d4ac313a9a417
Author: Sven Neumann <sven gimp org>
Date: Sun Sep 26 22:12:13 2010 +0200
libgimpwidgets: add const qualifiers
Sprinkle GIMP_CAIRO_ARGB32_SET_PIXEL() with const qualifiers.
libgimpwidgets/gimpcairo-utils.h | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/libgimpwidgets/gimpcairo-utils.h b/libgimpwidgets/gimpcairo-utils.h
index 0ff7650..7ccf27d 100644
--- a/libgimpwidgets/gimpcairo-utils.h
+++ b/libgimpwidgets/gimpcairo-utils.h
@@ -102,9 +102,9 @@ cairo_surface_t * gimp_cairo_surface_create_from_pixbuf (GdkPixbuf *pixbuf);
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define GIMP_CAIRO_ARGB32_SET_PIXEL(d, r, g, b, a) \
G_STMT_START { \
- guint tr = (a) * (r) + 0x80; \
- guint tg = (a) * (g) + 0x80; \
- guint tb = (a) * (b) + 0x80; \
+ const guint tr = (a) * (r) + 0x80; \
+ const guint tg = (a) * (g) + 0x80; \
+ const guint tb = (a) * (b) + 0x80; \
d[0] = (((tb) >> 8) + (tb)) >> 8; \
d[1] = (((tg) >> 8) + (tg)) >> 8; \
d[2] = (((tr) >> 8) + (tr)) >> 8; \
@@ -113,9 +113,9 @@ cairo_surface_t * gimp_cairo_surface_create_from_pixbuf (GdkPixbuf *pixbuf);
#else
#define GIMP_CAIRO_ARGB32_SET_PIXEL(d, r, g, b, a) \
G_STMT_START { \
- guint tr = (a) * (r) + 0x80; \
- guint tg = (a) * (g) + 0x80; \
- guint tb = (a) * (b) + 0x80; \
+ const guint tr = (a) * (r) + 0x80; \
+ const guint tg = (a) * (g) + 0x80; \
+ const guint tb = (a) * (b) + 0x80; \
d[0] = (a); \
d[1] = (((tr) >> 8) + (tr)) >> 8; \
d[2] = (((tg) >> 8) + (tg)) >> 8; \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]