[Bf-blender-cvs] [219573de22f] functions: Fix: Build error with MSVC

Lazydodo noreply at git.blender.org
Thu Aug 1 23:25:13 CEST 2019


Commit: 219573de22fa13300278c2b018f1258564973455
Author: Lazydodo
Date:   Thu Aug 1 15:25:07 2019 -0600
Branches: functions
https://developer.blender.org/rB219573de22fa13300278c2b018f1258564973455

Fix: Build error with MSVC

Zero sized arrays not being at the end of struct/class makes MSVC sad

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

M	source/blender/blenkernel/BKE_node_tree.hpp
M	source/blender/functions/core/data_graph_builder.hpp
M	source/blender/functions/frontends/data_flow_nodes/vtree_data_graph_builder.hpp

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

diff --git a/source/blender/blenkernel/BKE_node_tree.hpp b/source/blender/blenkernel/BKE_node_tree.hpp
index 3d50766f89f..baaf596f0a6 100644
--- a/source/blender/blenkernel/BKE_node_tree.hpp
+++ b/source/blender/blenkernel/BKE_node_tree.hpp
@@ -38,8 +38,8 @@ class VirtualNodeTree {
   Vector<VirtualLink *> m_links;
   Vector<VirtualSocket *> m_inputs_with_links;
   MultiMap<std::string, VirtualNode *> m_nodes_by_idname;
-  MonotonicAllocator<> m_allocator;
   uint m_socket_counter = 0;
+  MonotonicAllocator<> m_allocator;
 
  public:
   void add_all_of_tree(bNodeTree *btree);
diff --git a/source/blender/functions/core/data_graph_builder.hpp b/source/blender/functions/core/data_graph_builder.hpp
index fc3de824585..78a57b0f777 100644
--- a/source/blender/functions/core/data_graph_builder.hpp
+++ b/source/blender/functions/core/data_graph_builder.hpp
@@ -140,13 +140,13 @@ class BuilderNode {
 
 class DataGraphBuilder {
  private:
-  MonotonicAllocator<> m_allocator;
-  std::unique_ptr<MonotonicAllocator<>> m_source_info_allocator;
   Vector<BuilderNode *> m_nodes;
   uint m_link_counter = 0;
   uint m_input_socket_counter = 0;
   uint m_output_socket_counter = 0;
-
+  std::unique_ptr<MonotonicAllocator<>> m_source_info_allocator;
+  MonotonicAllocator<> m_allocator;
+  
  public:
   DataGraphBuilder();
   DataGraphBuilder(DataGraphBuilder &other) = delete;
diff --git a/source/blender/functions/frontends/data_flow_nodes/vtree_data_graph_builder.hpp b/source/blender/functions/frontends/data_flow_nodes/vtree_data_graph_builder.hpp
index 7a03131f8ca..900207cc4f3 100644
--- a/source/blender/functions/frontends/data_flow_nodes/vtree_data_graph_builder.hpp
+++ b/source/blender/functions/frontends/data_flow_nodes/vtree_data_graph_builder.hpp
@@ -19,12 +19,12 @@ using BKE::VirtualSocket;
 class VTreeDataGraphBuilder {
  private:
   VirtualNodeTree &m_vtree;
-  DataGraphBuilder m_graph_builder;
   Vector<BuilderSocket *> m_socket_map;
   Vector<SharedType> m_type_by_vsocket;
   StringMap<SharedType> &m_type_by_idname;
   StringMap<SharedType> &m_type_by_data_type;
   StringMap<std::string> &m_data_type_by_idname;
+  DataGraphBuilder m_graph_builder;
 
  public:
   VTreeDataGraphBuilder(VirtualNodeTree &vtree);



More information about the Bf-blender-cvs mailing list