From 2320470d342db4cb5ae0ae717dfc5ac94bd3f2d2 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 21 Jun 2025 21:18:28 +0800 Subject: internal(server): remove return of std::any for callbacks use bool for cases for premature return --- include/libsock/server/clients.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/libsock/server/clients.hpp') diff --git a/include/libsock/server/clients.hpp b/include/libsock/server/clients.hpp index 9e08797..d8c1921 100644 --- a/include/libsock/server/clients.hpp +++ b/include/libsock/server/clients.hpp @@ -2,7 +2,6 @@ #include "../types.hpp" #include "server.hpp" -#include #include #include #include @@ -25,14 +24,14 @@ class Clients : public std::enable_shared_from_this { static SP create(); ~Clients(); - WP newClient(std::function &)> loopFunc = [](const WP &) { return std::any(); }, SP server = pServer); + WP newClient(std::function &)> loopFunc = [](const WP &) { ; }, SP server = pServer); void broadcast(const std::string &msg, std::optional> self = std::nullopt); // second param only specified when we // want to exclude the sender - void kick(WP client, const bool kill = false, const std::string &reason = "", std::optional>>::iterator &)>> cb = std::nullopt); + void kick(WP client, const bool kill = false, const std::string &reason = "", std::optional>>::iterator &)>> cb = std::nullopt); void addClient(const Client &client); - void shutdownClients(std::optional>> &)>> cb = std::nullopt); + void shutdownClients(std::optional>> &)>> cb = std::nullopt); SP getByIp(const std::string &ip) const; std::vector> getClients() const; -- cgit v1.2.3