[cogl] object: Reorder the CoglObject members by size



commit c39333a2c6c007689c0f9a986dd060c2ff370c13
Author: Neil Roberts <neil linux intel com>
Date:   Tue Jan 24 15:55:27 2012 +0000

    object: Reorder the CoglObject members by size
    
    This moves the pointer members of CoglObject to the top and the int
    members to the bottom so that there won't be any padding inserted on
    64-bit machines. This reduces the size of the struct from 80 bytes to
    72.
    
    Reviewed-by: Robert Bragg <robert linux intel com>

 cogl/cogl-object-private.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl-object-private.h b/cogl/cogl-object-private.h
index e4c450e..52fa956 100644
--- a/cogl/cogl-object-private.h
+++ b/cogl/cogl-object-private.h
@@ -73,14 +73,14 @@ typedef struct
  */
 struct _CoglObject
 {
-  unsigned int      ref_count;
+  CoglObjectClass  *klass;
 
   CoglUserDataEntry user_data_entry[
     COGL_OBJECT_N_PRE_ALLOCATED_USER_DATA_ENTRIES];
   GArray           *user_data_array;
   int               n_user_data_entries;
 
-  CoglObjectClass  *klass;
+  unsigned int      ref_count;
 };
 
 /* Helper macro to encapsulate the common code for COGL reference



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