瀏覽代碼

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

Prevents an additional copy
Aaron Gokaslan 1 月之前
父節點
當前提交
f0990ca96d
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);
   }