Skip to content

Commit

Permalink
Fix template usage
Browse files Browse the repository at this point in the history
  • Loading branch information
myabandeh committed Mar 29, 2019
1 parent 029b670 commit 125e5c9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions table/iterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ class EmptyInternalIterator : public InternalIteratorBase<TValue> {
};
} // namespace

Iterator* NewEmptyIterator() {
return new EmptyIterator(Status::OK());
}

Iterator* NewErrorIterator(const Status& status) {
return new EmptyIterator(status);
}
Expand All @@ -180,7 +176,7 @@ InternalIteratorBase<TValue>* NewErrorInternalIterator(const Status& status,
if (arena == nullptr) {
return NewErrorInternalIterator<TValue>(status);
} else {
auto mem = arena->AllocateAligned(sizeof(EmptyIterator));
auto mem = arena->AllocateAligned(sizeof(EmptyInternalIterator<TValue>));
return new (mem) EmptyInternalIterator<TValue>(status);
}
}
Expand All @@ -201,7 +197,7 @@ InternalIteratorBase<TValue>* NewEmptyInternalIterator(Arena* arena) {
if (arena == nullptr) {
return NewEmptyInternalIterator<TValue>();
} else {
auto mem = arena->AllocateAligned(sizeof(EmptyInternalIterator));
auto mem = arena->AllocateAligned(sizeof(EmptyInternalIterator<TValue>));
return new (mem) EmptyInternalIterator<TValue>(Status::OK());
}
}
Expand Down

0 comments on commit 125e5c9

Please sign in to comment.