From: Adrian Bondrescu Date: Thu, 31 May 2012 23:36:57 +0000 (+0300) Subject: Implement the copy constructor for the Address structure. X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=f0771b9fe73d21ff42acc942d2bb44ce88f554a9;p=swifty.git Implement the copy constructor for the Address structure. --- diff --git a/src/libswift/swift.h b/src/libswift/swift.h index d44b882..288238a 100644 --- a/src/libswift/swift.h +++ b/src/libswift/swift.h @@ -108,6 +108,11 @@ namespace swift { Address() { clear(); } + Address(const Address &b) { + clear(); + addr->dests[0].addr = b.addr->dests[0].addr; + addr->dests[0].port = b.addr->dests[0].port; + } Address(const char* ip, uint16_t port) { clear(); set_ipv4(ip);