Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ class ThreadPool final : public TaskQueue {
public:
explicit ThreadPool(size_t n, size_t mqr = 0)
: shutdown_(false), max_queued_requests_(mqr) {
threads_.reserve(n);
while (n) {
threads_.emplace_back(worker(*this));
n--;
Expand Down Expand Up @@ -981,7 +982,7 @@ namespace detail {

class MatcherBase {
public:
MatcherBase(std::string pattern) : pattern_(pattern) {}
MatcherBase(std::string pattern) : pattern_(std::move(pattern)) {}
virtual ~MatcherBase() = default;

const std::string &pattern() const { return pattern_; }
Expand Down