void-packages/srcpkgs/qt5/patches/gcc7-linked_hash_set.patch

63 lines
1.8 KiB
Diff

--- qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-01-03 10:28:53.000000000 +0100
+++ qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/wtf/LinkedHashSet.h 2017-05-20 02:43:53.182512520 +0200
@@ -129,6 +129,29 @@
LinkedHashSetNodeBase& operator=(const LinkedHashSetNodeBase& other);
};
+inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b)
+{
+ ASSERT(a.m_prev && a.m_next && b.m_prev && b.m_next);
+ swap(a.m_prev, b.m_prev);
+ swap(a.m_next, b.m_next);
+ if (b.m_next == &a) {
+ ASSERT(b.m_prev == &a);
+ b.m_next = &b;
+ b.m_prev = &b;
+ } else {
+ b.m_next->m_prev = &b;
+ b.m_prev->m_next = &b;
+ }
+ if (a.m_next == &b) {
+ ASSERT(a.m_prev == &b);
+ a.m_next = &a;
+ a.m_prev = &a;
+ } else {
+ a.m_next->m_prev = &a;
+ a.m_prev->m_next = &a;
+ }
+}
+
template<typename ValueArg, typename Allocator>
class LinkedHashSetNode : public LinkedHashSetNodeBase {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
@@ -720,29 +743,6 @@
remove(find(value));
}
-inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b)
-{
- ASSERT(a.m_prev && a.m_next && b.m_prev && b.m_next);
- swap(a.m_prev, b.m_prev);
- swap(a.m_next, b.m_next);
- if (b.m_next == &a) {
- ASSERT(b.m_prev == &a);
- b.m_next = &b;
- b.m_prev = &b;
- } else {
- b.m_next->m_prev = &b;
- b.m_prev->m_next = &b;
- }
- if (a.m_next == &b) {
- ASSERT(a.m_prev == &b);
- a.m_next = &a;
- a.m_prev = &a;
- } else {
- a.m_next->m_prev = &a;
- a.m_prev->m_next = &a;
- }
-}
-
inline void swap(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b)
{
ASSERT(a.m_next != &a && b.m_next != &b);