From dfa719a3eb9638d6c77de0a95e2bf8b0d7846ed7 Mon Sep 17 00:00:00 2001 From: Jules Fouchy Date: Fri, 29 Dec 2023 20:27:36 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=BC=20[Particles]=20Cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Nodes/MaybeGenerateModule.h | 3 ++- src/Nodes/Node.h | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Nodes/MaybeGenerateModule.h b/src/Nodes/MaybeGenerateModule.h index 1676036d..5e856949 100644 --- a/src/Nodes/MaybeGenerateModule.h +++ b/src/Nodes/MaybeGenerateModule.h @@ -6,7 +6,8 @@ namespace Lab { /// Called for each node. -/// Returns a string iff a new module has been generated and gen_desired_function() should read the result of the module fom a texture (the name of the texture is the name returned by the function). +/// Returns a string iff a new module has been generated and gen_desired_function() should stop traversing the graph and instead read the image resulting from the new module from a texture +/// (the name of the texture is the name returned by the function). using MaybeGenerateModule = std::function(Cool::NodeId const&, NodeDefinition const&)>; } // namespace Lab \ No newline at end of file diff --git a/src/Nodes/Node.h b/src/Nodes/Node.h index c22e5e7e..d616280b 100644 --- a/src/Nodes/Node.h +++ b/src/Nodes/Node.h @@ -1,7 +1,6 @@ #pragma once #include #include -#include #include #include #include @@ -57,7 +56,7 @@ class Node { auto is_particle_initializer() const -> bool; auto particles_count() -> std::optional& { return _particles_count; } - auto particles_count() const -> std::optional const& { return _particles_count; } + auto particles_count() const -> std::optional { return _particles_count; } void set_particles_count(std::optional particles_count) { _particles_count = particles_count; } private: @@ -70,7 +69,7 @@ class Node { size_t _number_of_main_input_pins{}; size_t _number_of_function_inputs{}; - std::optional _particles_count{}; // HACK Only used in the case of a particle initializer node + std::optional _particles_count{}; // HACK Only used in the case of a Particle Initializer node private: friend class cereal::access;