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:
Beat Küng
2020-09-21 11:39:26 +02:00
committed by Daniel Agar
parent 09af5e0637
commit 5ac0c7c799
+2 -2
View File
@@ -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;
} }