mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
dht: remove deprecated constructor
This commit is contained in:
1 parent
675d892fc1
commit
79dfc0403a
2 files changed
+3
-6
No files matched your search
@@ -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();
|
||||
|
||||
/**
|
||||
|
||||
@@ -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"};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user