diff --git a/table/iterator.cc b/table/iterator.cc index fd3adc427..e42ca260b 100644 --- a/table/iterator.cc +++ b/table/iterator.cc @@ -157,10 +157,6 @@ class EmptyInternalIterator : public InternalIteratorBase { }; } // namespace -Iterator* NewEmptyIterator() { - return new EmptyIterator(Status::OK()); -} - Iterator* NewErrorIterator(const Status& status) { return new EmptyIterator(status); } @@ -180,7 +176,7 @@ InternalIteratorBase* NewErrorInternalIterator(const Status& status, if (arena == nullptr) { return NewErrorInternalIterator(status); } else { - auto mem = arena->AllocateAligned(sizeof(EmptyIterator)); + auto mem = arena->AllocateAligned(sizeof(EmptyInternalIterator)); return new (mem) EmptyInternalIterator(status); } } @@ -201,7 +197,7 @@ InternalIteratorBase* NewEmptyInternalIterator(Arena* arena) { if (arena == nullptr) { return NewEmptyInternalIterator(); } else { - auto mem = arena->AllocateAligned(sizeof(EmptyIterator)); + auto mem = arena->AllocateAligned(sizeof(EmptyInternalIterator)); return new (mem) EmptyInternalIterator(Status::OK()); } }