Browse Source

Use std::move for request redirection (#2311)

Prevents an additional copy
Aaron Gokaslan 1 tháng trước cách đây
mục cha
commit
f0990ca96d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -10578,7 +10578,7 @@ inline bool ClientImpl::handle_request(Stream &strm, Request &req,
   }
 
   if (300 < res.status && res.status < 400 && follow_location_) {
-    req = req_save;
+    req = std::move(req_save);
     ret = redirect(req, res, error);
   }