Skip to content

Commit

Permalink
qwaitcondition_p.h: fix -Wunused-const-variable
Browse files Browse the repository at this point in the history
Make the constexpr variable inline instead of static to shut up the
warning.

Amends fbc4912.

Task-number: QTBUG-126219
Change-Id: Ifa8db14dc28f039d0dc65eb779d715cd4a2c7240
Reviewed-by: Thiago Macieira <[email protected]>
(cherry picked from commit 743403c)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
(cherry picked from commit ea1da56)
  • Loading branch information
marcmutz authored and Qt Cherry-pick Bot committed Sep 19, 2024
1 parent 6ab3742 commit 79f0a98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/corelib/thread/qwaitcondition_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace QtPrivate {
// 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
// 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::condition_variable) > sizeof(void *) ?
64 : alignof(void*);
Expand Down

0 comments on commit 79f0a98

Please sign in to comment.