[Bf-blender-cvs] [3d4a844a507] master: Cleanup: ExecutionSystem::find_output_execution_groups.

Jeroen Bakker noreply at git.blender.org
Fri Mar 5 16:56:19 CET 2021


Commit: 3d4a844a50744815d234c96dd72af675f478dbe1
Author: Jeroen Bakker
Date:   Fri Mar 5 15:25:05 2021 +0100
Branches: master
https://developer.blender.org/rB3d4a844a50744815d234c96dd72af675f478dbe1

Cleanup: ExecutionSystem::find_output_execution_groups.

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

M	source/blender/compositor/intern/COM_ExecutionSystem.cpp
M	source/blender/compositor/intern/COM_ExecutionSystem.h

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

diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 3da2523bfdb..9d6359e9cb3 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -179,10 +179,10 @@ void ExecutionSystem::execute()
 
   WorkScheduler::start(this->m_context);
 
-  executeGroups(COM_PRIORITY_HIGH);
+  execute_groups(COM_PRIORITY_HIGH);
   if (!this->getContext().isFastCalculation()) {
-    executeGroups(COM_PRIORITY_MEDIUM);
-    executeGroups(COM_PRIORITY_LOW);
+    execute_groups(COM_PRIORITY_MEDIUM);
+    execute_groups(COM_PRIORITY_LOW);
   }
 
   WorkScheduler::finish();
@@ -199,26 +199,23 @@ void ExecutionSystem::execute()
   }
 }
 
-void ExecutionSystem::executeGroups(CompositorPriority priority)
+void ExecutionSystem::execute_groups(CompositorPriority priority)
 {
-  unsigned int index;
-  std::vector<ExecutionGroup *> executionGroups;
-  this->findOutputExecutionGroup(&executionGroups, priority);
-
-  for (index = 0; index < executionGroups.size(); index++) {
-    ExecutionGroup *group = executionGroups[index];
+  blender::Vector<ExecutionGroup *> execution_groups = find_output_execution_groups(priority);
+  for (ExecutionGroup *group : execution_groups) {
     group->execute(this);
   }
 }
 
-void ExecutionSystem::findOutputExecutionGroup(std::vector<ExecutionGroup *> *result,
-                                               CompositorPriority priority) const
+blender::Vector<ExecutionGroup *> ExecutionSystem::find_output_execution_groups(
+    CompositorPriority priority) const
 {
-  unsigned int index;
-  for (index = 0; index < this->m_groups.size(); index++) {
-    ExecutionGroup *group = this->m_groups[index];
+  blender::Vector<ExecutionGroup *> result;
+
+  for (ExecutionGroup *group : m_groups) {
     if (group->isOutputExecutionGroup() && group->getRenderPriotrity() == priority) {
-      result->push_back(group);
+      result.append(group);
     }
   }
+  return result;
 }
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h
index 8b69caf106f..dd68edd4793 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.h
@@ -137,8 +137,8 @@ class ExecutionSystem {
   /**
    * find all execution group with output nodes
    */
-  void findOutputExecutionGroup(std::vector<ExecutionGroup *> *result,
-                                CompositorPriority priority) const;
+  blender::Vector<ExecutionGroup *> find_output_execution_groups(
+      CompositorPriority priority) const;
 
  public:
   /**
@@ -181,7 +181,7 @@ class ExecutionSystem {
   }
 
  private:
-  void executeGroups(CompositorPriority priority);
+  void execute_groups(CompositorPriority priority);
 
   /* allow the DebugInfo class to look at internals */
   friend class DebugInfo;



More information about the Bf-blender-cvs mailing list