Browse Source

flow: ::empty function

Michele Caini 2 years ago
parent
commit
00ac590e2f
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/entt/graph/flow.hpp

+ 8 - 0
src/entt/graph/flow.hpp

@@ -215,6 +215,14 @@ public:
         std::swap(sync_on, other.sync_on);
     }
 
+    /**
+     * @brief Returns true if a flow builder contains no tasks, false otherwise.
+     * @return True if the flow builder contains no tasks, false otherwise.
+     */
+    [[nodiscard]] bool empty() const noexcept {
+        return vertices.empty();
+    }
+
     /**
      * @brief Returns the number of tasks.
      * @return The number of tasks.