[gimp] Pack boolean members into a bitfield to save two integers per item



commit 7f94f3213b67ceeb98a4cce3ae0fdf2a6964a710
Author: Michael Natterer <mitch gimp org>
Date:   Wed Aug 19 11:08:56 2009 +0200

    Pack boolean members into a bitfield to save two integers per item

 app/core/gimpitem.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpitem.h b/app/core/gimpitem.h
index 3f429a1..70a9b78 100644
--- a/app/core/gimpitem.h
+++ b/app/core/gimpitem.h
@@ -46,10 +46,10 @@ struct _GimpItem
   gint              width, height;      /*  size in pixels           */
   gint              offset_x, offset_y; /*  pixel offset in image    */
 
-  gboolean          visible;            /*  control visibility       */
-  gboolean          linked;             /*  control linkage          */
+  guint             visible : 1;        /*  control visibility       */
+  guint             linked  : 1;        /*  control linkage          */
 
-  gboolean          removed;            /*  removed from the image?  */
+  guint             removed : 1;        /*  removed from the image?  */
 
   GeglNode         *node;               /*  the GEGL node to plug
                                             into the graph           */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]