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 c1fa5e1 commit 0a9102fCopy full SHA for 0a9102f
httplib.h
@@ -873,6 +873,7 @@ class ThreadPool final : public TaskQueue {
873
public:
874
explicit ThreadPool(size_t n, size_t mqr = 0)
875
: shutdown_(false), max_queued_requests_(mqr) {
876
+ threads_.reserve(n);
877
while (n) {
878
threads_.emplace_back(worker(*this));
879
n--;
@@ -981,7 +982,7 @@ namespace detail {
981
982
983
class MatcherBase {
984
- MatcherBase(std::string pattern) : pattern_(pattern) {}
985
+ MatcherBase(std::string pattern) : pattern_(std::move(pattern)) {}
986
virtual ~MatcherBase() = default;
987
988
const std::string &pattern() const { return pattern_; }
0 commit comments