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:
Yashom Dighe 2020-09-22 02:25:04 +05:30 committed by GitHub
parent e4a408bc55
commit 5daca6c2c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}