You've already forked cpp-httplib
Use move semantics for auth key and value (#2306)
This commit is contained in:
@@ -6822,7 +6822,7 @@ inline bool parse_www_authenticate(const Response &res,
|
|||||||
static_cast<size_t>(m.length(2)))
|
static_cast<size_t>(m.length(2)))
|
||||||
: s.substr(static_cast<size_t>(m.position(3)),
|
: s.substr(static_cast<size_t>(m.position(3)),
|
||||||
static_cast<size_t>(m.length(3)));
|
static_cast<size_t>(m.length(3)));
|
||||||
auth[key] = val;
|
auth[std::move(key)] = std::move(val);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user