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
This commit is contained in:
Igor Canadi 2014-06-03 12:28:58 -07:00
parent df9069d23f
commit fd27001072
4 changed files with 7 additions and 9 deletions

View File

@ -3563,7 +3563,7 @@ Iterator* DBImpl::NewIterator(const ReadOptions& options,
return nullptr; return nullptr;
#else #else
// TODO(ljin): remove tailing iterator // 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, return NewDBIterator(env_, *cfd->options(), cfd->user_comparator(), iter,
kMaxSequenceNumber); kMaxSequenceNumber);
// return new TailingIterator(env_, this, options, cfd); // return new TailingIterator(env_, this, options, cfd);

View File

@ -478,7 +478,7 @@ Iterator* NewDBIterator(Env* env, const Options& options,
false); false);
} }
ArenaWrappedDBIter::~ArenaWrappedDBIter() { db_iter_->~Iterator(); } ArenaWrappedDBIter::~ArenaWrappedDBIter() { db_iter_->~DBIter(); }
void ArenaWrappedDBIter::SetDBIter(DBIter* iter) { db_iter_ = iter; } void ArenaWrappedDBIter::SetDBIter(DBIter* iter) { db_iter_ = iter; }

View File

@ -101,10 +101,9 @@ class LevelIterator : public Iterator {
std::unique_ptr<Iterator> file_iter_; std::unique_ptr<Iterator> file_iter_;
}; };
ForwardIterator::ForwardIterator(Env* const env, DBImpl* db, ForwardIterator::ForwardIterator(DBImpl* db, const ReadOptions& read_options,
const ReadOptions& read_options, ColumnFamilyData* cfd) ColumnFamilyData* cfd)
: db_(db), : db_(db),
env_(env),
read_options_(read_options), read_options_(read_options),
cfd_(cfd), cfd_(cfd),
prefix_extractor_(cfd->options()->prefix_extractor.get()), prefix_extractor_(cfd->options()->prefix_extractor.get()),

View File

@ -22,7 +22,7 @@ class Env;
struct SuperVersion; struct SuperVersion;
class ColumnFamilyData; class ColumnFamilyData;
class LevelIterator; class LevelIterator;
class FileMetaData; struct FileMetaData;
class MinIterComparator { class MinIterComparator {
public: public:
@ -49,8 +49,8 @@ typedef std::priority_queue<Iterator*,
*/ */
class ForwardIterator : public Iterator { class ForwardIterator : public Iterator {
public: public:
ForwardIterator(Env* const env, DBImpl* db, const ReadOptions& read_options, ForwardIterator(DBImpl* db, const ReadOptions& read_options,
ColumnFamilyData* cfd); ColumnFamilyData* cfd);
virtual ~ForwardIterator(); virtual ~ForwardIterator();
void SeekToLast() override { void SeekToLast() override {
@ -81,7 +81,6 @@ class ForwardIterator : public Iterator {
uint32_t left, uint32_t right); uint32_t left, uint32_t right);
DBImpl* const db_; DBImpl* const db_;
Env* const env_;
const ReadOptions read_options_; const ReadOptions read_options_;
ColumnFamilyData* const cfd_; ColumnFamilyData* const cfd_;
const SliceTransform* const prefix_extractor_; const SliceTransform* const prefix_extractor_;