From 687226d95d6e7a6f05136efaa4a13f606c42a629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ka=C4=9Fan=20Can=20=C5=9Eit?= Date: Mon, 12 Jan 2026 10:21:17 +0300 Subject: [PATCH] The upd_sink and dist_sink files have been modified to address Passed by value warnings. (#3520) --- include/spdlog/sinks/dist_sink.h | 2 +- include/spdlog/sinks/udp_sink.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdlog/sinks/dist_sink.h b/include/spdlog/sinks/dist_sink.h index 69c4971c..b143e58e 100644 --- a/include/spdlog/sinks/dist_sink.h +++ b/include/spdlog/sinks/dist_sink.h @@ -24,7 +24,7 @@ class dist_sink : public base_sink { public: dist_sink() = default; explicit dist_sink(std::vector> sinks) - : sinks_(sinks) {} + : sinks_(std::move(sinks)) {} dist_sink(const dist_sink &) = delete; dist_sink &operator=(const dist_sink &) = delete; diff --git a/include/spdlog/sinks/udp_sink.h b/include/spdlog/sinks/udp_sink.h index 6f287719..9980ef7a 100644 --- a/include/spdlog/sinks/udp_sink.h +++ b/include/spdlog/sinks/udp_sink.h @@ -36,7 +36,7 @@ template class udp_sink : public spdlog::sinks::base_sink { public: // host can be hostname or ip address - explicit udp_sink(udp_sink_config sink_config) + explicit udp_sink(const udp_sink_config& sink_config) : client_{sink_config.server_host, sink_config.server_port} {} ~udp_sink() override = default;