diff --git a/include/behaviortree_cpp/utils/signal.h b/include/behaviortree_cpp/utils/signal.h index a49d7e605..fc1a0c28d 100644 --- a/include/behaviortree_cpp/utils/signal.h +++ b/include/behaviortree_cpp/utils/signal.h @@ -8,7 +8,7 @@ namespace BT { /** - * Super simple Signal/Slop implementation, AKA "Observable pattern". + * Super simple Signal/Slot implementation, AKA "Observable pattern". * The subscriber is active until it goes out of scope or Subscriber::reset() is called. */ template @@ -34,7 +34,7 @@ class Signal } } - Subscriber subscribe(CallableFunction func) + [[nodiscard]] Subscriber subscribe(CallableFunction func) { Subscriber sub = std::make_shared(std::move(func)); subscribers_.emplace_back(sub);