From 964154ce44cfa25bd59c6fa10113e948a3b43d5c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 21 Jul 2018 22:31:41 -0400 Subject: file_util: std::move FST entries in ScanDirectoryTree() Avoids unnecessary copies when building up the FST entries. --- src/common/file_util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index d8163a4a8..543adbffb 100644 --- a/src/common/file_util.cpp +++ b/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; }; -- cgit v1.2.3