[Bf-blender-cvs] [36427a8d036] master: Cleanup: remove loading blender namespace from Vector.

Jeroen Bakker noreply at git.blender.org
Fri Apr 2 16:17:00 CEST 2021


Commit: 36427a8d03673a8604d3ec4b30be709e86fe6312
Author: Jeroen Bakker
Date:   Fri Apr 2 16:13:27 2021 +0200
Branches: master
https://developer.blender.org/rB36427a8d03673a8604d3ec4b30be709e86fe6312

Cleanup: remove loading blender namespace from Vector.

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

M	source/blender/compositor/intern/COM_ExecutionGroup.h
M	source/blender/compositor/intern/COM_ExecutionSystem.cc
M	source/blender/compositor/intern/COM_ExecutionSystem.h
M	source/blender/compositor/intern/COM_Node.h
M	source/blender/compositor/intern/COM_NodeGraph.cc
M	source/blender/compositor/intern/COM_NodeGraph.h
M	source/blender/compositor/intern/COM_NodeOperation.h
M	source/blender/compositor/intern/COM_NodeOperationBuilder.cc
M	source/blender/compositor/intern/COM_NodeOperationBuilder.h
M	source/blender/compositor/intern/COM_WorkScheduler.cc
M	source/blender/compositor/nodes/COM_CryptomatteNode.cc
M	source/blender/compositor/nodes/COM_CryptomatteNode.h
M	source/blender/compositor/operations/COM_CryptomatteOperation.h
M	source/blender/compositor/operations/COM_OutputFileOperation.h

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

diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index f9cbceffd3e..cb593feabb0 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -92,7 +92,7 @@ class ExecutionGroup {
   /**
    * \brief list of operations in this ExecutionGroup
    */
-  blender::Vector<NodeOperation *> m_operations;
+  Vector<NodeOperation *> m_operations;
 
   ExecutionGroupFlags m_flags;
 
@@ -136,7 +136,7 @@ class ExecutionGroup {
   /**
    * \brief All read operations of this execution group.
    */
-  blender::Vector<ReadBufferOperation *> m_read_operations;
+  Vector<ReadBufferOperation *> m_read_operations;
 
   /**
    * \brief reference to the original bNodeTree,
@@ -153,7 +153,7 @@ class ExecutionGroup {
   /**
    * \brief m_work_packages holds all unit of work.
    */
-  blender::Vector<WorkPackage> m_work_packages;
+  Vector<WorkPackage> m_work_packages;
 
   /**
    * \brief denotes boundary for border compositing
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cc b/source/blender/compositor/intern/COM_ExecutionSystem.cc
index cb8c1b9326d..e22dc17837b 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cc
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cc
@@ -119,14 +119,14 @@ ExecutionSystem::~ExecutionSystem()
   this->m_groups.clear();
 }
 
-void ExecutionSystem::set_operations(const blender::Vector<NodeOperation *> &operations,
-                                     const blender::Vector<ExecutionGroup *> &groups)
+void ExecutionSystem::set_operations(const Vector<NodeOperation *> &operations,
+                                     const Vector<ExecutionGroup *> &groups)
 {
   m_operations = operations;
   m_groups = groups;
 }
 
-static void update_read_buffer_offset(blender::Vector<NodeOperation *> &operations)
+static void update_read_buffer_offset(Vector<NodeOperation *> &operations)
 {
   unsigned int order = 0;
   for (NodeOperation *operation : operations) {
@@ -138,7 +138,7 @@ static void update_read_buffer_offset(blender::Vector<NodeOperation *> &operatio
   }
 }
 
-static void init_write_operations_for_execution(blender::Vector<NodeOperation *> &operations,
+static void init_write_operations_for_execution(Vector<NodeOperation *> &operations,
                                                 const bNodeTree *bTree)
 {
   for (NodeOperation *operation : operations) {
@@ -149,7 +149,7 @@ static void init_write_operations_for_execution(blender::Vector<NodeOperation *>
   }
 }
 
-static void link_write_buffers(blender::Vector<NodeOperation *> &operations)
+static void link_write_buffers(Vector<NodeOperation *> &operations)
 {
   for (NodeOperation *operation : operations) {
     if (operation->get_flags().is_read_buffer_operation) {
@@ -159,7 +159,7 @@ static void link_write_buffers(blender::Vector<NodeOperation *> &operations)
   }
 }
 
-static void init_non_write_operations_for_execution(blender::Vector<NodeOperation *> &operations,
+static void init_non_write_operations_for_execution(Vector<NodeOperation *> &operations,
                                                     const bNodeTree *bTree)
 {
   for (NodeOperation *operation : operations) {
@@ -170,7 +170,7 @@ static void init_non_write_operations_for_execution(blender::Vector<NodeOperatio
   }
 }
 
-static void init_execution_groups_for_execution(blender::Vector<ExecutionGroup *> &groups,
+static void init_execution_groups_for_execution(Vector<ExecutionGroup *> &groups,
                                                 const int chunk_size)
 {
   for (ExecutionGroup *execution_group : groups) {
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h
index 672bda68668..e6170c48778 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.h
@@ -129,12 +129,12 @@ class ExecutionSystem {
   /**
    * \brief vector of operations
    */
-  blender::Vector<NodeOperation *> m_operations;
+  Vector<NodeOperation *> m_operations;
 
   /**
    * \brief vector of groups
    */
-  blender::Vector<ExecutionGroup *> m_groups;
+  Vector<ExecutionGroup *> m_groups;
 
  private:  // methods
  public:
@@ -159,8 +159,8 @@ class ExecutionSystem {
    */
   ~ExecutionSystem();
 
-  void set_operations(const blender::Vector<NodeOperation *> &operations,
-                      const blender::Vector<ExecutionGroup *> &groups);
+  void set_operations(const Vector<NodeOperation *> &operations,
+                      const Vector<ExecutionGroup *> &groups);
 
   /**
    * \brief execute this system
diff --git a/source/blender/compositor/intern/COM_Node.h b/source/blender/compositor/intern/COM_Node.h
index a16e71a9b27..28b59397af9 100644
--- a/source/blender/compositor/intern/COM_Node.h
+++ b/source/blender/compositor/intern/COM_Node.h
@@ -65,12 +65,12 @@ class Node {
   /**
    * \brief the list of actual input-sockets \see NodeInput
    */
-  blender::Vector<NodeInput *> inputs;
+  Vector<NodeInput *> inputs;
 
   /**
    * \brief the list of actual output-sockets \see NodeOutput
    */
-  blender::Vector<NodeOutput *> outputs;
+  Vector<NodeOutput *> outputs;
 
  public:
   Node(bNode *editorNode, bool create_sockets = true);
@@ -115,7 +115,7 @@ class Node {
   /**
    * \brief get access to the vector of input sockets
    */
-  const blender::Vector<NodeInput *> &getInputSockets() const
+  const Vector<NodeInput *> &getInputSockets() const
   {
     return this->inputs;
   }
@@ -123,7 +123,7 @@ class Node {
   /**
    * \brief get access to the vector of input sockets
    */
-  const blender::Vector<NodeOutput *> &getOutputSockets() const
+  const Vector<NodeOutput *> &getOutputSockets() const
   {
     return this->outputs;
   }
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cc b/source/blender/compositor/intern/COM_NodeGraph.cc
index 7e05bf637b7..1907022e0ec 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cc
+++ b/source/blender/compositor/intern/COM_NodeGraph.cc
@@ -156,7 +156,7 @@ void NodeGraph::add_bNode(const CompositorContext &context,
 
 NodeOutput *NodeGraph::find_output(const NodeRange &node_range, bNodeSocket *b_socket)
 {
-  for (blender::Vector<Node *>::iterator it = node_range.first; it != node_range.second; ++it) {
+  for (Vector<Node *>::iterator it = node_range.first; it != node_range.second; ++it) {
     Node *node = *it;
     for (NodeOutput *output : node->getOutputSockets()) {
       if (output->getbNodeSocket() == b_socket) {
@@ -187,7 +187,7 @@ void NodeGraph::add_bNodeLink(const NodeRange &node_range, bNodeLink *b_nodelink
     return;
   }
 
-  for (blender::Vector<Node *>::iterator it = node_range.first; it != node_range.second; ++it) {
+  for (Vector<Node *>::iterator it = node_range.first; it != node_range.second; ++it) {
     Node *node = *it;
     for (NodeInput *input : node->getInputSockets()) {
       if (input->getbNodeSocket() == b_nodelink->tosock && !input->isLinked()) {
diff --git a/source/blender/compositor/intern/COM_NodeGraph.h b/source/blender/compositor/intern/COM_NodeGraph.h
index 9347df5d9e2..68bba7b1007 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.h
+++ b/source/blender/compositor/intern/COM_NodeGraph.h
@@ -52,18 +52,18 @@ class NodeGraph {
   };
 
  private:
-  blender::Vector<Node *> m_nodes;
-  blender::Vector<Link> m_links;
+  Vector<Node *> m_nodes;
+  Vector<Link> m_links;
 
  public:
   NodeGraph();
   ~NodeGraph();
 
-  const blender::Vector<Node *> &nodes() const
+  const Vector<Node *> &nodes() const
   {
     return m_nodes;
   }
-  const blender::Vector<Link> &links() const
+  const Vector<Link> &links() const
   {
     return m_links;
   }
@@ -71,8 +71,7 @@ class NodeGraph {
   void from_bNodeTree(const CompositorContext &context, bNodeTree *tree);
 
  protected:
-  typedef std::pair<blender::Vector<Node *>::iterator, blender::Vector<Node *>::iterator>
-      NodeRange;
+  typedef std::pair<Vector<Node *>::iterator, Vector<Node *>::iterator> NodeRange;
 
   static bNodeSocket *find_b_node_input(bNode *b_node, const char *identifier);
   static bNodeSocket *find_b_node_output(bNode *b_node, const char *identifier);
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h
index a613955d21a..783c1fd63c8 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.h
+++ b/source/blender/compositor/intern/COM_NodeOperation.h
@@ -252,8 +252,8 @@ struct NodeOperationFlags {
 class NodeOperation {
  private:
   std::string m_name;
-  blender::Vector<NodeOperationInput> m_inputs;
-  blender::Vector<NodeOperationOutput> m_outputs;
+  Vector<NodeOperationInput> m_inputs;
+  Vector<NodeOperationOutput> m_outputs;
 
   /**
    * \brief the index of the input socket that will be used to determine the resolution
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
index b1e1424f14e..717602d04ab 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
@@ -254,7 +254,7 @@ void NodeOperationBuilder::registerViewer(ViewerOperation *viewer)
 
 void NodeOperationBuilder::add_datatype_conversions()
 {
-  blender::Vector<Link> convert_links;
+  Vector<Link> convert_links;
   for (const Link &link : m_links) {
     /* proxy operations can skip data type conversion */
     NodeOperation *from_op = &link.from()->getOperation();
@@ -285,7 +285,7 @@ void NodeOperationBuilder::add_operation_input_constants()
   /* Note: unconnected inputs cached first to avoid modifying
    *       m_operations while iterating over it
    */
-  blender::Vector<NodeOperationInput *> pending_inputs;
+  Vector<NodeOperationInput *> pending_inputs;
   for (NodeOperation *op : m_operations) {
     for (int k = 0; k < op->getNumberOfInputSockets(); ++k) {
       NodeOperationInput *input = op->getInputSocket(k);
@@ -353,7 +353,7 @@ void NodeOperationBuilder::add_input_constant_value(NodeOperationInput *input,
 
 v

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list