Avoid FileMetaData copy

Summary: as titled

Test Plan: unit tests

Reviewers: sdong, lightmark

Reviewed By: lightmark

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D60597
This commit is contained in:
Andrew Kryczka 2016-07-13 15:36:22 -07:00
parent 15b7a4ab88
commit 56222f57df

View File

@ -193,7 +193,7 @@ class VersionEdit {
f.smallest_seqno = smallest_seqno;
f.largest_seqno = largest_seqno;
f.marked_for_compaction = marked_for_compaction;
new_files_.emplace_back(level, f);
new_files_.emplace_back(level, std::move(f));
}
void AddFile(int level, const FileMetaData& f) {