From 74ad42dc4c0cd5e01351325fb52ea8fa3208f594 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Fri, 2 Oct 2015 15:09:21 +0200 Subject: [PATCH] move make_unique around --- pdns/dnsdist.hh | 5 ----- pdns/misc.hh | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pdns/dnsdist.hh b/pdns/dnsdist.hh index 0e0e12645d..a1c318bcbf 100644 --- a/pdns/dnsdist.hh +++ b/pdns/dnsdist.hh @@ -330,11 +330,6 @@ std::shared_ptr leastOutstanding(const NumberedServerVector& se std::shared_ptr wrandom(const NumberedServerVector& servers, const ComboAddress& remote, const DNSName& qname, uint16_t qtype, dnsheader* dh); std::shared_ptr roundrobin(const NumberedServerVector& servers, const ComboAddress& remote, const DNSName& qname, uint16_t qtype, dnsheader* dh); int getEDNSZ(const char* packet, unsigned int len); -template -std::unique_ptr make_unique(Args&&... args) -{ - return std::unique_ptr(new T(std::forward(args)...)); -} void dnsdistWebserverThread(int sock, const ComboAddress& local, const string& password); bool getMsgLen(int fd, uint16_t* len); bool putMsgLen(int fd, uint16_t len); diff --git a/pdns/misc.hh b/pdns/misc.hh index 43515a5a14..11f2526cdb 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -621,3 +621,9 @@ bool setNonBlocking( int sock ); int closesocket(int fd); bool setCloseOnExec(int sock); uint64_t udpErrorStats(const std::string& str); + +template +std::unique_ptr make_unique(Args&&... args) +{ + return std::unique_ptr(new T(std::forward(args)...)); +} -- 2.47.2