فهرست منبع

Use move semantics for auth key and value (#2306)

Aaron Gokaslan 1 ماه پیش
والد
کامیت
681d388247
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -6822,7 +6822,7 @@ inline bool parse_www_authenticate(const Response &res,
                                     static_cast<size_t>(m.length(2)))
                          : s.substr(static_cast<size_t>(m.position(3)),
                                     static_cast<size_t>(m.length(3)));
-          auth[key] = val;
+          auth[std::move(key)] = std::move(val);
         }
         return true;
       }