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