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
main
Igor Canadi 11 years ago
parent df9069d23f
commit fd27001072
  1. 2
      db/db_impl.cc
  2. 2
      db/db_iter.cc
  3. 5
      db/forward_iterator.cc
  4. 7
      db/forward_iterator.h

@ -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);

@ -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; }

@ -101,10 +101,9 @@ class LevelIterator : public Iterator {
std::unique_ptr<Iterator> 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()),

@ -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<Iterator*,
*/
class ForwardIterator : public Iterator {
public:
ForwardIterator(Env* const env, DBImpl* db, const ReadOptions& read_options,
ColumnFamilyData* cfd);
ForwardIterator(DBImpl* db, const ReadOptions& read_options,
ColumnFamilyData* cfd);
virtual ~ForwardIterator();
void SeekToLast() override {
@ -81,7 +81,6 @@ class ForwardIterator : public Iterator {
uint32_t left, uint32_t right);
DBImpl* const db_;
Env* const env_;
const ReadOptions read_options_;
ColumnFamilyData* const cfd_;
const SliceTransform* const prefix_extractor_;

Loading…
Cancel
Save