Преглед на файлове

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