瀏覽代碼

Add another missing std::move for _base_dirs vector (#2314)

Aaron Gokaslan 1 月之前
父節點
當前提交
25688258ad
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -8540,7 +8540,7 @@ inline bool Server::set_mount_point(const std::string &mount_point,
   if (stat.is_dir()) {
     std::string mnt = !mount_point.empty() ? mount_point : "/";
     if (!mnt.empty() && mnt[0] == '/') {
-      base_dirs_.push_back({mnt, dir, std::move(headers)});
+      base_dirs_.push_back({std::move(mnt), dir, std::move(headers)});
       return true;
     }
   }