소스 검색

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