mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 06:14:14 +08:00
List.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
This commit is contained in:
@@ -126,12 +126,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->getSibling();
|
||||
};
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user