Parcourir la source

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

Aaron Gokaslan il y a 1 mois
Parent
commit
c23764269d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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_;
   }