@@ -145,11 +145,11 @@ using ssize_t = long;
145
145
#endif // _MSC_VER
146
146
147
147
#ifndef S_ISREG
148
- #define S_ISREG (m ) (((m)& S_IFREG) == S_IFREG)
148
+ #define S_ISREG (m ) (((m) & S_IFREG) == S_IFREG)
149
149
#endif // S_ISREG
150
150
151
151
#ifndef S_ISDIR
152
- #define S_ISDIR (m ) (((m)& S_IFDIR) == S_IFDIR)
152
+ #define S_ISDIR (m ) (((m) & S_IFDIR) == S_IFDIR)
153
153
#endif // S_ISDIR
154
154
155
155
#ifndef NOMINMAX
@@ -719,7 +719,7 @@ class ThreadPool final : public TaskQueue {
719
719
720
720
if (pool_.shutdown_ && pool_.jobs_ .empty ()) { break ; }
721
721
722
- fn = std::move ( pool_.jobs_ .front () );
722
+ fn = pool_.jobs_ .front ();
723
723
pool_.jobs_ .pop_front ();
724
724
}
725
725
@@ -3809,7 +3809,7 @@ inline bool parse_header(const char *beg, const char *end, T fn) {
3809
3809
auto val = compare_case_ignore (key, " Location" )
3810
3810
? std::string (p, end)
3811
3811
: decode_url (std::string (p, end), false );
3812
- fn (std::move ( key), std::move ( val) );
3812
+ fn (key, val);
3813
3813
return true ;
3814
3814
}
3815
3815
@@ -3847,8 +3847,8 @@ inline bool read_headers(Stream &strm, Headers &headers) {
3847
3847
auto end = line_reader.ptr () + line_reader.size () - line_terminator_len;
3848
3848
3849
3849
parse_header (line_reader.ptr (), end,
3850
- [&](std::string && key, std::string & &val) {
3851
- headers.emplace (std::move ( key), std::move ( val) );
3850
+ [&](const std::string &key, const std::string &val) {
3851
+ headers.emplace (key, val);
3852
3852
});
3853
3853
}
3854
3854
@@ -3948,8 +3948,8 @@ inline bool read_content_chunked(Stream &strm, T &x,
3948
3948
auto end = line_reader.ptr () + line_reader.size () - line_terminator_len;
3949
3949
3950
3950
parse_header (line_reader.ptr (), end,
3951
- [&](std::string && key, std::string & &val) {
3952
- x.headers .emplace (std::move ( key), std::move ( val) );
3951
+ [&](const std::string &key, const std::string &val) {
3952
+ x.headers .emplace (key, val);
3953
3953
});
3954
3954
3955
3955
if (!line_reader.getline ()) { return false ; }
@@ -4461,7 +4461,7 @@ class MultipartFormDataParser {
4461
4461
const auto header = buf_head (pos);
4462
4462
4463
4463
if (!parse_header (header.data (), header.data () + header.size (),
4464
- [&](std::string &&, std::string & &) {})) {
4464
+ [&](const std::string &, const std::string &) {})) {
4465
4465
is_valid_ = false ;
4466
4466
return false ;
4467
4467
}
0 commit comments