Merge pull request #901 from mapleFU:opt-using-move

PiperOrigin-RevId: 420662938
This commit is contained in:
Victor Costan 2022-01-10 06:35:14 +00:00
commit 8ccb79b57e

View File

@ -136,7 +136,7 @@ class Limiter {
class PosixSequentialFile final : public SequentialFile {
public:
PosixSequentialFile(std::string filename, int fd)
: fd_(fd), filename_(filename) {}
: fd_(fd), filename_(std::move(filename)) {}
~PosixSequentialFile() override { close(fd_); }
Status Read(size_t n, Slice* result, char* scratch) override {