]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
move make_unique around
authorbert hubert <bert.hubert@powerdns.com>
Fri, 2 Oct 2015 13:09:21 +0000 (15:09 +0200)
committerbert hubert <bert.hubert@powerdns.com>
Fri, 2 Oct 2015 13:11:42 +0000 (15:11 +0200)
pdns/dnsdist.hh
pdns/misc.hh

index 0e0e12645da7cc94ba381720cc0ec3630af3be7b..a1c318bcbfb2f2f47a4cd5ee9366590dc0d9ae27 100644 (file)
@@ -330,11 +330,6 @@ std::shared_ptr<DownstreamState> leastOutstanding(const NumberedServerVector& se
 std::shared_ptr<DownstreamState> wrandom(const NumberedServerVector& servers, const ComboAddress& remote, const DNSName& qname, uint16_t qtype, dnsheader* dh);
 std::shared_ptr<DownstreamState> roundrobin(const NumberedServerVector& servers, const ComboAddress& remote, const DNSName& qname, uint16_t qtype, dnsheader* dh);
 int getEDNSZ(const char* packet, unsigned int len);
-template<typename T, typename... Args>
-std::unique_ptr<T> make_unique(Args&&... args)
-{
-    return std::unique_ptr<T>(new T(std::forward<Args>(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);
index 43515a5a14c08de145100ea8412e2ea75ca76d49..11f2526cdbbd78c51f5be274d9ae9b908777a79c 100644 (file)
@@ -621,3 +621,9 @@ bool setNonBlocking( int sock );
 int closesocket(int fd);
 bool setCloseOnExec(int sock);
 uint64_t udpErrorStats(const std::string& str);
+
+template<typename T, typename... Args>
+std::unique_ptr<T> make_unique(Args&&... args)
+{
+    return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+}