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 Pick-to: 6.6 6.5 Change-Id: I4abf5162d521fc5dca0286a6254f86c57a473367 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
2a2275756b
commit
c4a1c171a3
@ -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…
Reference in New Issue
Block a user