[Bf-blender-cvs] [74ebbafb3eb] master: DNA: reduce Object size by 16 bytes

Campbell Barton noreply at git.blender.org
Sun Jun 23 13:05:23 CEST 2019


Commit: 74ebbafb3ebdaec81c261d4c196923b8ebd9d7ed
Author: Campbell Barton
Date:   Sun Jun 23 20:58:24 2019 +1000
Branches: master
https://developer.blender.org/rB74ebbafb3ebdaec81c261d4c196923b8ebd9d7ed

DNA: reduce Object size by 16 bytes

No need to use int for boolean value.

===================================================================

M	source/blender/makesdna/DNA_object_types.h

===================================================================

diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 66e01cae37b..13b7a0a7600 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -139,7 +139,13 @@ typedef struct Object_Runtime {
 
   /** Selection id of this object; only available in the original object */
   int select_id;
-  char _pad1[4];
+  char _pad1[3];
+
+  /**
+   * Denotes whether the evaluated mesh is owned by this object or is referenced and owned by
+   * somebody else.
+   */
+  char is_mesh_eval_owned;
 
   /** Axis aligned boundbox (in localspace). */
   struct BoundBox *bb;
@@ -155,12 +161,6 @@ typedef struct Object_Runtime {
    * It has all modifiers applied.
    */
   struct Mesh *mesh_eval;
-  /**
-   * Denotes whether the evaluated mesh is owned by this object or is referenced and owned by
-   * somebody else.
-   */
-  int is_mesh_eval_owned;
-  int _pad3[3];
   /**
    * Mesh structure created during object evaluation.
    * It has deforemation only modifiers applied on it.



More information about the Bf-blender-cvs mailing list