dht: remove deprecated constructor

This commit is contained in:
Adrien Béraud committed 2023-06-01 14:25:45 -04:00
1 parent 675d892fc1
commit 79dfc0403a
2 files changed
+3 -6

No files matched your search

-3
View File
@@ -67,9 +67,6 @@ public:
*/
Dht(std::unique_ptr<net::DatagramSocket>&& sock, const Config& config, const Sp<Logger>& l = {});
Dht(std::unique_ptr<net::DatagramSocket>&& sock, const Config& config, const Logger& l = {})
: Dht(std::move(sock), config, std::make_shared<Logger>(l)) {}
virtual ~Dht();
/**
+3 -3
View File
@@ -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"};
}