From 44de6670380a6030719f95efc18b4b7c36d26644 Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Sun, 22 May 2022 14:35:39 +0200 Subject: [PATCH] Make recursive publish methods static --- subscriptionstore.cpp | 4 ++-- subscriptionstore.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/subscriptionstore.cpp b/subscriptionstore.cpp index 4f32753..2d200d3 100644 --- a/subscriptionstore.cpp +++ b/subscriptionstore.cpp @@ -383,7 +383,7 @@ void SubscriptionStore::queueWillMessage(const std::shared_ptr &wil } void SubscriptionStore::publishNonRecursively(const std::unordered_map &subscribers, - std::forward_list &targetSessions) const + std::forward_list &targetSessions) { for (auto &pair : subscribers) { @@ -410,7 +410,7 @@ void SubscriptionStore::publishNonRecursively(const std::unordered_map::const_iterator cur_subtopic_it, std::vector::const_iterator end, - SubscriptionNode *this_node, std::forward_list &targetSessions) const + SubscriptionNode *this_node, std::forward_list &targetSessions) { if (cur_subtopic_it == end) // This is the end of the topic path, so look for subscribers here. { diff --git a/subscriptionstore.h b/subscriptionstore.h index 64b7136..1dc359d 100644 --- a/subscriptionstore.h +++ b/subscriptionstore.h @@ -125,10 +125,10 @@ class SubscriptionStore Logger *logger = Logger::getInstance(); - void publishNonRecursively(const std::unordered_map &subscribers, - std::forward_list &targetSessions) const; - void publishRecursively(std::vector::const_iterator cur_subtopic_it, std::vector::const_iterator end, - SubscriptionNode *this_node, std::forward_list &targetSessions) const; + static void publishNonRecursively(const std::unordered_map &subscribers, + std::forward_list &targetSessions); + static void publishRecursively(std::vector::const_iterator cur_subtopic_it, std::vector::const_iterator end, + SubscriptionNode *this_node, std::forward_list &targetSessions); void giveClientRetainedMessagesRecursively(std::vector::const_iterator cur_subtopic_it, std::vector::const_iterator end, RetainedMessageNode *this_node, bool poundMode, std::forward_list &packetList) const; -- libgit2 0.21.4