mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +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() const { return node; }
|
||||||
operator T &() { return node; }
|
operator T &() { return node; }
|
||||||
T operator* () const { return node; }
|
const T &operator* () const { return node; }
|
||||||
Iterator &operator++ ()
|
Iterator &operator++ ()
|
||||||
{
|
{
|
||||||
if (node) {
|
if (node) {
|
||||||
node = node->getSibling();
|
node = node->getSibling();
|
||||||
};
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user