use the pointer directly (#8095)

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/8095

Reviewed By: riversand963

Differential Revision: D27318295

Pulled By: jay-zhuang

fbshipit-source-id: a014fbd28fdd7a26648da19a766dc00d2de9fdc8
main
darionyaphet 4 years ago committed by Facebook GitHub Bot
parent ce6de862c1
commit 0a5d23944d
  1. 6
      file/random_access_file_reader_test.cc

@ -38,12 +38,12 @@ class RandomAccessFileReaderTest : public testing::Test {
} }
void Read(const std::string& fname, const FileOptions& opts, void Read(const std::string& fname, const FileOptions& opts,
std::unique_ptr<RandomAccessFileReader>* reader) { std::unique_ptr<RandomAccessFileReader>* reader) {
std::string fpath = Path(fname); std::string fpath = Path(fname);
std::unique_ptr<FSRandomAccessFile> f; std::unique_ptr<FSRandomAccessFile> f;
ASSERT_OK(fs_->NewRandomAccessFile(fpath, opts, &f, nullptr)); ASSERT_OK(fs_->NewRandomAccessFile(fpath, opts, &f, nullptr));
(*reader).reset(new RandomAccessFileReader(std::move(f), fpath, reader->reset(new RandomAccessFileReader(std::move(f), fpath,
env_->GetSystemClock().get())); env_->GetSystemClock().get()));
} }
void AssertResult(const std::string& content, void AssertResult(const std::string& content,

Loading…
Cancel
Save