From 79dfc0403adfc0fdedca1a4d76e91657e81a6b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= Date: Thu, 1 Jun 2023 14:25:45 -0400 Subject: [PATCH] dht: remove deprecated constructor --- include/opendht/dht.h | 3 --- include/opendht/logger.h | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/opendht/dht.h b/include/opendht/dht.h index 33595718..5ccd81fa 100644 --- a/include/opendht/dht.h +++ b/include/opendht/dht.h @@ -67,9 +67,6 @@ public: */ Dht(std::unique_ptr&& sock, const Config& config, const Sp& l = {}); - Dht(std::unique_ptr&& sock, const Config& config, const Logger& l = {}) - : Dht(std::move(sock), config, std::make_shared(l)) {} - virtual ~Dht(); /** diff --git a/include/opendht/logger.h b/include/opendht/logger.h index 09af78c7..54838f5d 100644 --- a/include/opendht/logger.h +++ b/include/opendht/logger.h @@ -41,9 +41,9 @@ struct Logger { LogMethodFmt logger = {}; LogMethodPrintf loggerf = {}; - Logger() = default; - Logger(LogMethodFmt&& logger, LogMethodPrintf&& loggerf) - : logger(std::move(logger)), loggerf(std::move(loggerf)) { + Logger() = delete; + Logger(LogMethodFmt&& l, LogMethodPrintf&& lf) + : logger(std::move(l)), loggerf(std::move(lf)) { if (!logger or !loggerf) throw std::invalid_argument{"logger and loggerf must be set"}; }