forked from Archive/PX4-Autopilot
IntrusiveSortedList.hpp: let operator* return a reference
So that clang 12 does not complain: loop variable 'child' is always a copy because the range of type 'List<ModuleParams *>' does not return a reference Co-authored-by: Yashom Dighe <yashom7@gmail.com>
This commit is contained in:
parent
e4a408bc55
commit
5daca6c2c4
|
@ -133,12 +133,12 @@ public:
|
|||
|
||||
operator T() const { return node; }
|
||||
operator T &() { return node; }
|
||||
T operator* () const { return node; }
|
||||
const T &operator* () const { return node; }
|
||||
Iterator &operator++ ()
|
||||
{
|
||||
if (node) {
|
||||
node = node->getSortedSibling();
|
||||
};
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue