AK: Give IntrusiveBinaryHeap template args named types

Works around https://gcc.gnu.org/PR70413. Without this, the next
commit would cause -Wsubobject-linkage warnings for AK/BinaryHeap.h
when used in LibCompress/Huffman.h.

We can undo this once we're on GCC 14 everywhere.

No behavior change.
This commit is contained in:
Nico Weber 2024-06-30 21:27:41 +02:00
parent 59ef7d0d4e
commit 9cc688041a

View file

@ -166,11 +166,15 @@ private:
V value;
};
IntrusiveBinaryHeap<
Node,
decltype([](Node const& a, Node const& b) { return a.key < b.key; }),
decltype([](Node&, size_t) {})>
m_heap;
struct NodeComparator {
bool operator()(Node const& a, Node const& b) const { return a.key < b.key; }
};
struct NodeIndexSetter {
void operator()(Node&, size_t) const { }
};
IntrusiveBinaryHeap<Node, NodeComparator, NodeIndexSetter> m_heap;
};
}