1
0
Fork 0
mirror of https://git.suyu.dev/suyu/flatpak.git synced 2025-01-06 14:26:07 +00:00
yuzu-suyu-flatpak/shared-modules/qt4/fixgcc9.patch
2024-03-07 20:28:57 -03:00

31 lines
1.4 KiB
Diff

--- qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h 2015-05-07 16:14:48.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.7-gcc9/src/corelib/global/qglobal.h 2020-05-28 16:24:45.160340385 +0200
@@ -2482,22 +2482,22 @@
#endif /* Q_NO_TYPESAFE_FLAGS */
-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_RVCT)
+#if (defined(Q_CC_GNU) && !defined(Q_CC_RVCT))
/* make use of typeof-extension */
template <typename T>
class QForeachContainer {
public:
- inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { }
+ inline QForeachContainer(const T& t) : c(t), i(c.begin()), e(c.end()), control(1) { }
const T c;
- int brk;
typename T::const_iterator i, e;
+ int control;
};
#define Q_FOREACH(variable, container) \
for (QForeachContainer<__typeof__(container)> _container_(container); \
- !_container_.brk && _container_.i != _container_.e; \
- __extension__ ({ ++_container_.brk; ++_container_.i; })) \
- for (variable = *_container_.i;; __extension__ ({--_container_.brk; break;}))
+ _container_.control && _container_.i != _container_.e; \
+ ++_container_.i, _container_.control ^= 1) \
+ for (variable = *_container_.i; _container_.control; _container_.control = 0)
#else