소스 검색

Use std::move for boundary in set_boundary method (#2298)

Aaron Gokaslan 1 개월 전
부모
커밋
c23764269d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -5970,7 +5970,7 @@ public:
   FormDataParser() = default;
 
   void set_boundary(std::string &&boundary) {
-    boundary_ = boundary;
+    boundary_ = std::move(boundary);
     dash_boundary_crlf_ = dash_ + boundary_ + crlf_;
     crlf_dash_boundary_ = crlf_ + dash_ + boundary_;
   }