mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05:00
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:
parent
59ef7d0d4e
commit
9cc688041a
1 changed files with 9 additions and 5 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue