Skip to content

Commit ae94d64

Browse files
authored
Remove another unnecessary string copy (#2305)
1 parent 3401877 commit ae94d64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

httplib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6880,7 +6880,7 @@ inline void hosted_at(const std::string &hostname,
68806880
auto dummy = -1;
68816881
if (detail::get_ip_and_port(addr, sizeof(struct sockaddr_storage), ip,
68826882
dummy)) {
6883-
addrs.push_back(ip);
6883+
addrs.emplace_back(std::move(ip));
68846884
}
68856885
}
68866886
}

0 commit comments

Comments
 (0)