qwaitcondition_p.h: fix -Wunused-const-variable
Make the constexpr variable inline instead of static to shut up the warning. Amends fbc491230fe62f739925e8113d05f4108e2738ef. Pick-to: 6.7 Task-number: QTBUG-126219 Change-Id: Ifa8db14dc28f039d0dc65eb779d715cd4a2c7240 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 743403cb6d9957c1bdb6ef7a1bb6f30377f578a5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
9709c4f842
commit
ea1da56f84
@ -28,7 +28,7 @@ namespace QtPrivate {
|
|||||||
// Ideal alignment for mutex and condition_variable: it's the hardware
|
// Ideal alignment for mutex and condition_variable: it's the hardware
|
||||||
// interference size (size of a cache line) if the types are likely to contain
|
// interference size (size of a cache line) if the types are likely to contain
|
||||||
// the actual data structures, otherwise just that of a pointer.
|
// the actual data structures, otherwise just that of a pointer.
|
||||||
static constexpr quintptr IdealMutexAlignment =
|
inline constexpr quintptr IdealMutexAlignment =
|
||||||
sizeof(std::mutex) > sizeof(void *) &&
|
sizeof(std::mutex) > sizeof(void *) &&
|
||||||
sizeof(std::condition_variable) > sizeof(void *) ?
|
sizeof(std::condition_variable) > sizeof(void *) ?
|
||||||
64 : alignof(void*);
|
64 : alignof(void*);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user