mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Stop misusing volatile keyword
This commit is contained in:
parent
4c9be808a7
commit
27cb54c1db
4 changed files with 11 additions and 11 deletions
|
@ -161,7 +161,7 @@ void TestThreading::testAtomicSemaphoreThread()
|
|||
|
||||
|
||||
|
||||
static volatile bool g_tls_broken;
|
||||
static std::atomic<bool> g_tls_broken;
|
||||
|
||||
class TLSTestThread : public Thread {
|
||||
public:
|
||||
|
@ -226,7 +226,7 @@ private:
|
|||
*/
|
||||
void TestThreading::testTLS()
|
||||
{
|
||||
static const int num_threads = 10;
|
||||
constexpr int num_threads = 10;
|
||||
|
||||
for (int j = 0; j < num_threads; j++) {
|
||||
g_tls_broken = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue