mirror of https://github.com/aria2/aria2
Code cleanup
parent
7b04c841d6
commit
5ba7150333
|
@ -291,7 +291,7 @@ void extractPeer(const ValueBase* peerData, int family, OutputIterator dest)
|
||||||
if(p.first.empty()) {
|
if(p.first.empty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
*dest_++ = std::shared_ptr<Peer>(new Peer(p.first, p.second));
|
*dest_++ = std::make_shared<Peer>(p.first, p.second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -315,7 +315,7 @@ void extractPeer(const ValueBase* peerData, int family, OutputIterator dest)
|
||||||
if(!ip || !port || !(0 < port->i() && port->i() < 65536)) {
|
if(!ip || !port || !(0 < port->i() && port->i() < 65536)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
*dest_ = std::shared_ptr<Peer>(new Peer(ip->s(), port->i()));
|
*dest_ = std::make_shared<Peer>(ip->s(), port->i());
|
||||||
++dest_;
|
++dest_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue