You've already forked cpp-httplib
Remove another unnecessary string copy (#2305)
This commit is contained in:
@@ -6880,7 +6880,7 @@ inline void hosted_at(const std::string &hostname,
|
|||||||
auto dummy = -1;
|
auto dummy = -1;
|
||||||
if (detail::get_ip_and_port(addr, sizeof(struct sockaddr_storage), ip,
|
if (detail::get_ip_and_port(addr, sizeof(struct sockaddr_storage), ip,
|
||||||
dummy)) {
|
dummy)) {
|
||||||
addrs.push_back(ip);
|
addrs.emplace_back(std::move(ip));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user