From fd270010724385bd6cc0151e7bd7ae025511afcd Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Tue, 3 Jun 2014 12:28:58 -0700 Subject: [PATCH] Fix compile errors on Mac Summary: https://phabricator.fb.com/P11372644 Test Plan: compiles Reviewers: sdong, ljin Reviewed By: ljin Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D18873 --- db/db_impl.cc | 2 +- db/db_iter.cc | 2 +- db/forward_iterator.cc | 5 ++--- db/forward_iterator.h | 7 +++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 38285e030..5301fa599 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -3563,7 +3563,7 @@ Iterator* DBImpl::NewIterator(const ReadOptions& options, return nullptr; #else // TODO(ljin): remove tailing iterator - auto iter = new ForwardIterator(env_, this, options, cfd); + auto iter = new ForwardIterator(this, options, cfd); return NewDBIterator(env_, *cfd->options(), cfd->user_comparator(), iter, kMaxSequenceNumber); // return new TailingIterator(env_, this, options, cfd); diff --git a/db/db_iter.cc b/db/db_iter.cc index 4c206f02f..1f49b7aa7 100644 --- a/db/db_iter.cc +++ b/db/db_iter.cc @@ -478,7 +478,7 @@ Iterator* NewDBIterator(Env* env, const Options& options, false); } -ArenaWrappedDBIter::~ArenaWrappedDBIter() { db_iter_->~Iterator(); } +ArenaWrappedDBIter::~ArenaWrappedDBIter() { db_iter_->~DBIter(); } void ArenaWrappedDBIter::SetDBIter(DBIter* iter) { db_iter_ = iter; } diff --git a/db/forward_iterator.cc b/db/forward_iterator.cc index b80e300ea..35a31ddc5 100644 --- a/db/forward_iterator.cc +++ b/db/forward_iterator.cc @@ -101,10 +101,9 @@ class LevelIterator : public Iterator { std::unique_ptr file_iter_; }; -ForwardIterator::ForwardIterator(Env* const env, DBImpl* db, - const ReadOptions& read_options, ColumnFamilyData* cfd) +ForwardIterator::ForwardIterator(DBImpl* db, const ReadOptions& read_options, + ColumnFamilyData* cfd) : db_(db), - env_(env), read_options_(read_options), cfd_(cfd), prefix_extractor_(cfd->options()->prefix_extractor.get()), diff --git a/db/forward_iterator.h b/db/forward_iterator.h index 754a69947..d539ae3c7 100644 --- a/db/forward_iterator.h +++ b/db/forward_iterator.h @@ -22,7 +22,7 @@ class Env; struct SuperVersion; class ColumnFamilyData; class LevelIterator; -class FileMetaData; +struct FileMetaData; class MinIterComparator { public: @@ -49,8 +49,8 @@ typedef std::priority_queue