Revamp Semaphores example: Replace const by constexpr when applicable
Replace const by constexpr when the value of the variable can be calculated at compile-time. Fixes: QTBUG-108859 Change-Id: I4abf5162d521fc5dca0286a6254f86c57a473367 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit c4a1c171a3b2ade21a344de99962b3848e4ad85a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 87728a233062eb6a9039676479cf534e20ca3526)
This commit is contained in:
parent
c58b9f5919
commit
acf7871558
@ -7,9 +7,9 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
//! [0]
|
||||
const int DataSize = 100000;
|
||||
constexpr int DataSize = 100000;
|
||||
|
||||
const int BufferSize = 8192;
|
||||
constexpr int BufferSize = 8192;
|
||||
char buffer[BufferSize];
|
||||
|
||||
QSemaphore freeBytes(BufferSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user