ソースを参照

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);
   }