Skip to content

Commit 7249af3

Browse files
Skylion007noresources
authored andcommitted
Remove another unnecessary string copy (yhirose#2305)
1 parent d911c51 commit 7249af3

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)