We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4ecb96 commit bce08e6Copy full SHA for bce08e6
httplib.h
@@ -5941,7 +5941,7 @@ inline bool parse_accept_header(const std::string &s,
5941
return;
5942
}
5943
5944
- entries.push_back(accept_entry);
+ entries.push_back(std::move(accept_entry));
5945
});
5946
5947
// Return false if any invalid entry was found
@@ -5958,8 +5958,8 @@ inline bool parse_accept_header(const std::string &s,
5958
5959
// Extract sorted media types
5960
content_types.reserve(entries.size());
5961
- for (const auto &entry : entries) {
5962
- content_types.push_back(entry.media_type);
+ for (auto &entry : entries) {
+ content_types.push_back(std::move(entry.media_type));
5963
5964
5965
return true;
0 commit comments