Explorar o código

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

Aaron Gokaslan hai 1 mes
pai
achega
c23764269d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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_;
   }