if (isAtEnd() || Other.isAtEnd())
return isAtEnd() && Other.isAtEnd();
- return *Doc == *Other.Doc;
+ return Doc == Other.Doc;
}
bool operator !=(const document_iterator &Other) {
return !(*this == Other);
private:
bool isAtEnd() const {
- return Doc == 0 || *Doc == 0;
+ return !Doc || !*Doc;
}
OwningPtr<Document> *Doc;