소스 검색

file_util: std::move FST entries in ScanDirectoryTree()

Avoids unnecessary copies when building up the FST entries.
Lioncash 8 년 전
부모
커밋
964154ce44
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/common/file_util.cpp

+ 1 - 1
src/common/file_util.cpp

@@ -480,7 +480,7 @@ unsigned ScanDirectoryTree(const std::string& directory, FSTEntry& parent_entry,
         (*num_entries_out)++;
 
         // Push into the tree
-        parent_entry.children.push_back(entry);
+        parent_entry.children.push_back(std::move(entry));
         return true;
     };