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"}; }