Commit: d533b70b234d6a6cb7a44a556fcbf3fc68f67085
Author: Brecht Van Lommel
Date:   Mon Apr 9 15:01:41 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd533b70b234d6a6cb7a44a556fcbf3fc68f67085

Fix build error with GCC, make depsgraph iterator compatible with C++.

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

M       source/blender/depsgraph/DEG_depsgraph_query.h
M       source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h

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

diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h 
b/source/blender/depsgraph/DEG_depsgraph_query.h
index 3a8d6e70aca..8600022b7c3 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -86,11 +86,12 @@ typedef enum eDepsObjectIteratorMode {
 
 typedef struct DEGObjectIterData {
        struct Depsgraph *graph;
+       eDepsObjectIteratorMode mode;
+       int flag;
+
        struct Scene *scene;
        struct EvaluationContext eval_ctx;
 
-       int flag;
-       eDepsObjectIteratorMode mode;
        int visibility_check; /* eObjectVisibilityCheck. */
 
        /* **** Iteration over dupli-list. *** */
@@ -127,9 +128,9 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter);
 #define DEG_OBJECT_ITER_BEGIN(graph_, instance_, mode_, flag_)                 
   \
        {                                                                       
      \
                DEGObjectIterData data_ = {                                     
          \
-                       .graph = (graph_),                                      
              \
-                       .mode = (mode_),                                        
              \
-                       .flag = (flag_),                                        
              \
+                       graph_,                                                 
              \
+                       mode_,                                                  
              \
+                       flag_                                                   
              \
                };                                                              
          \
                                                                                
   \
                ITER_BEGIN(DEG_iterator_objects_begin,                          
          \
diff --git 
a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h 
b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
index e671c916934..f9a8c787c08 100644
--- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
+++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
@@ -60,9 +60,9 @@ extern "C" {
 #include "BLI_iterator.h"
 #include "BLI_listbase.h"
 #include "BLI_math.h"
+}
 
 #include "DEG_depsgraph_query.h"
-}
 
 #ifdef WITH_CXX_GUARDEDALLOC
 #include "MEM_guardedalloc.h"

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to