diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-07-21 22:31:41 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-07-21 22:31:44 -0400 |
| commit | 2684cc586ea2987f78c37a6cf73ce2a2e7caa20f (patch) | |
| tree | 737a4e955b1eb666bd0086749603fe15b1b65058 /src/common | |
| parent | 6602b23676d33b59f64a4711f7bb72043e76abf8 (diff) | |
file_util: std::move FST entries in ScanDirectoryTree()
Avoids unnecessary copies when building up the FST entries.
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/file_util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index d8163a4a83..543adbffb4 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; }; |
