mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-31 13:10:37 +00:00
Remove another unnecessary string copy (#2305)
This commit is contained in:
1 parent
3401877d3d
commit
ae94d64f67
1 file changed
+1
-1
@@ -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