fixed map and array list implemented as non - members
This commit is contained in:
parent
9013ac240f
commit
4f3cfdcaaf
@ -133,18 +133,28 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//SHOULDDO this should be implemented as non-member
|
// //SHOULDDO this should be implemented as non-member
|
||||||
bool operator==(const typename
|
// bool operator==(const typename
|
||||||
ArrayList<T, count_t>::Iterator& other) const {
|
// ArrayList<T, count_t>::Iterator& other) const {
|
||||||
return (value == other.value);
|
// return (value == other.value);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //SHOULDDO this should be implemented as non-member
|
||||||
|
// bool operator!=(const typename
|
||||||
|
// ArrayList<T, count_t>::Iterator& other) const {
|
||||||
|
// return !(*this == other);
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
friend bool operator==(const ArrayList::Iterator& lhs,
|
||||||
|
const ArrayList::Iterator& rhs) {
|
||||||
|
return (lhs.value == rhs.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//SHOULDDO this should be implemented as non-member
|
friend bool operator!=(const ArrayList::Iterator& lhs,
|
||||||
bool operator!=(const typename
|
const ArrayList::Iterator& rhs) {
|
||||||
ArrayList<T, count_t>::Iterator& other) const {
|
return not (lhs.value == rhs.value);
|
||||||
return !(*this == other);
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Iterator pointing to the first stored elmement
|
* Iterator pointing to the first stored elmement
|
||||||
@ -251,4 +261,6 @@ protected:
|
|||||||
bool allocated;
|
bool allocated;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* FSFW_CONTAINER_ARRAYLIST_H_ */
|
#endif /* FSFW_CONTAINER_ARRAYLIST_H_ */
|
||||||
|
@ -61,6 +61,16 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
friend bool operator==(const typename FixedMap::Iterator& lhs,
|
||||||
|
const typename FixedMap::Iterator& rhs) {
|
||||||
|
return (lhs.value == rhs.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
friend bool operator!=(const typename FixedMap::Iterator& lhs,
|
||||||
|
const typename FixedMap::Iterator& rhs) {
|
||||||
|
return not (lhs.value == rhs.value);
|
||||||
|
}
|
||||||
|
|
||||||
Iterator begin() const {
|
Iterator begin() const {
|
||||||
return Iterator(&theMap[0]);
|
return Iterator(&theMap[0]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user