From 8efe154aa5f10b86181d970f53951b66a403f092 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 12 Jun 2023 11:45:37 +0200 Subject: [PATCH] QSemaphore: drop unneeded unnamed namespace around QtSemaphorePrivate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes GCC 11 C++17 unity-build (didn't investigate which one is the problem) error: qsemaphore.cpp:275:7: error: ‘QSemaphorePrivate’ has a base ‘{anonymous}::QtSemaphorePrivate::Layout1’ whose type uses the anonymous namespace [-Werror=subobject-linkage] 275 | class QSemaphorePrivate : public QtSemaphorePrivate::Members | ^~~~~~~~~~~~~~~~~ Amends fbc491230fe62f739925e8113d05f4108e2738ef. Change-Id: I3b95a35822ec62aabd4c310b02bf58679bb9651f Reviewed-by: Thiago Macieira Reviewed-by: Fabian Kosmale --- src/corelib/thread/qsemaphore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/thread/qsemaphore.cpp b/src/corelib/thread/qsemaphore.cpp index cc68c2b0cb4..e09750581ee 100644 --- a/src/corelib/thread/qsemaphore.cpp +++ b/src/corelib/thread/qsemaphore.cpp @@ -251,7 +251,7 @@ futexSemaphoreTryAcquire(QBasicAtomicInteger &u, int n, T timeout) return false; } -namespace { namespace QtSemaphorePrivate { +namespace QtSemaphorePrivate { using namespace QtPrivate; struct Layout1 { @@ -270,7 +270,7 @@ struct Layout2 // Choose Layout1 if it is smaller than Layout2. That happens for platforms // where sizeof(mutex) is 64. using Members = std::conditional_t; -} } // namespace QtSemaphorePrivate +} // namespace QtSemaphorePrivate class QSemaphorePrivate : public QtSemaphorePrivate::Members {