Some small interface fixes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3715 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -90,11 +90,11 @@ public:
|
|||||||
|
|
||||||
SinglyLinkedListIterator(Parent *parent, NodeType *node, NodeType *previous);
|
SinglyLinkedListIterator(Parent *parent, NodeType *node, NodeType *previous);
|
||||||
|
|
||||||
bool operator==(const IteratorType &ref);
|
bool operator==(const IteratorType &ref) const;
|
||||||
bool operator!=(const IteratorType &ref);
|
bool operator!=(const IteratorType &ref) const;
|
||||||
inline Reference operator*();
|
inline Reference operator*() const;
|
||||||
inline Pointer operator->();
|
inline Pointer operator->() const;
|
||||||
IteratorType operator++();
|
IteratorType &operator++();
|
||||||
IteratorType operator++(int);
|
IteratorType operator++(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -116,13 +116,14 @@ _ITERATOR::SinglyLinkedListIterator(Parent *parent, NodeType *node, NodeType *pr
|
|||||||
|
|
||||||
_ITERATOR_TEMPLATE_LIST
|
_ITERATOR_TEMPLATE_LIST
|
||||||
bool
|
bool
|
||||||
_ITERATOR::operator==(const _ITERATOR &ref) {
|
_ITERATOR::operator==(const _ITERATOR &ref) const
|
||||||
|
{
|
||||||
return fParent == ref.fParent && fNode == ref.fNode && fPrevious == ref.fPrevious;
|
return fParent == ref.fParent && fNode == ref.fNode && fPrevious == ref.fPrevious;
|
||||||
}
|
}
|
||||||
|
|
||||||
_ITERATOR_TEMPLATE_LIST
|
_ITERATOR_TEMPLATE_LIST
|
||||||
bool
|
bool
|
||||||
_ITERATOR::operator!=(const _ITERATOR &ref)
|
_ITERATOR::operator!=(const _ITERATOR &ref) const
|
||||||
{
|
{
|
||||||
return !operator==(ref);
|
return !operator==(ref);
|
||||||
}
|
}
|
||||||
@@ -130,18 +131,20 @@ _ITERATOR::operator!=(const _ITERATOR &ref)
|
|||||||
_ITERATOR_TEMPLATE_LIST
|
_ITERATOR_TEMPLATE_LIST
|
||||||
inline
|
inline
|
||||||
Reference
|
Reference
|
||||||
_ITERATOR::operator*() {
|
_ITERATOR::operator*() const
|
||||||
|
{
|
||||||
return fParent->GetValue(fNode);
|
return fParent->GetValue(fNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ITERATOR_TEMPLATE_LIST
|
_ITERATOR_TEMPLATE_LIST
|
||||||
Pointer
|
Pointer
|
||||||
_ITERATOR::operator->() {
|
_ITERATOR::operator->() const
|
||||||
|
{
|
||||||
return &(operator*());
|
return &(operator*());
|
||||||
}
|
}
|
||||||
|
|
||||||
_ITERATOR_TEMPLATE_LIST
|
_ITERATOR_TEMPLATE_LIST
|
||||||
_ITERATOR
|
_ITERATOR&
|
||||||
_ITERATOR::operator++() {
|
_ITERATOR::operator++() {
|
||||||
if (fNode) {
|
if (fNode) {
|
||||||
fPrevious = fNode;
|
fPrevious = fNode;
|
||||||
|
|||||||
Reference in New Issue
Block a user