summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-29 16:30:13 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-31 12:56:50 +0200
commit5747f3139219abd6c8670953620cee1f5584caba (patch)
tree07dda7644e3628ead8459efa304e36d705e36521 /src/corelib/thread
parent4ed483b0e24b410b6bb240b48b4ad71e67877dc2 (diff)
Another round of 0->nullptr cleanup
Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthreadstorage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/thread/qthreadstorage.cpp b/src/corelib/thread/qthreadstorage.cpp
index 9c9a63d29b..7f78f69bc7 100644
--- a/src/corelib/thread/qthreadstorage.cpp
+++ b/src/corelib/thread/qthreadstorage.cpp
@@ -92,7 +92,7 @@ QThreadStorageData::QThreadStorageData(void (*func)(void *))
return;
}
for (id = 0; id < destr->count(); id++) {
- if (destr->at(id) == 0)
+ if (destr->at(id) == nullptr)
break;
}
if (id == destr->count()) {
@@ -108,7 +108,7 @@ QThreadStorageData::~QThreadStorageData()
DEBUG_MSG("QThreadStorageData: Released id %d", id);
QMutexLocker locker(&destructorsMutex);
if (destructors())
- (*destructors())[id] = 0;
+ (*destructors())[id] = nullptr;
}
void **QThreadStorageData::get() const
@@ -152,7 +152,7 @@ void **QThreadStorageData::set(void *p)
QMutexLocker locker(&destructorsMutex);
DestructorMap *destr = destructors();
- void (*destructor)(void *) = destr ? destr->value(id) : 0;
+ void (*destructor)(void *) = destr ? destr->value(id) : nullptr;
locker.unlock();
void *q = value;
@@ -201,7 +201,7 @@ void QThreadStorageData::finish(void **p)
if (tls->size() > i) {
//re reset the tls in case it has been recreated by its own destructor.
- (*tls)[i] = 0;
+ (*tls)[i] = nullptr;
}
}
tls->clear();