mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +02:00
corrected the lock positions to cover the getJointIndex calls
This commit is contained in:
parent
857a4ab739
commit
72264203db
1 changed files with 2 additions and 2 deletions
|
@ -1750,6 +1750,7 @@ protected:
|
||||||
|
|
||||||
template <typename T, typename F>
|
template <typename T, typename F>
|
||||||
T readLockWithNamedJointIndex(const QString& name, const T& defaultValue, F f) const {
|
T readLockWithNamedJointIndex(const QString& name, const T& defaultValue, F f) const {
|
||||||
|
QReadLocker readLock(&_jointDataLock);
|
||||||
int index = getJointIndex(name);
|
int index = getJointIndex(name);
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
index = getFauxJointIndex(name);
|
index = getFauxJointIndex(name);
|
||||||
|
@ -1757,7 +1758,6 @@ protected:
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
QReadLocker readLock(&_jointDataLock);
|
|
||||||
return f(index);
|
return f(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1768,6 +1768,7 @@ protected:
|
||||||
|
|
||||||
template <typename F>
|
template <typename F>
|
||||||
void writeLockWithNamedJointIndex(const QString& name, F f) {
|
void writeLockWithNamedJointIndex(const QString& name, F f) {
|
||||||
|
QWriteLocker writeLock(&_jointDataLock);
|
||||||
int index = getJointIndex(name);
|
int index = getJointIndex(name);
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
index = getFauxJointIndex(name);
|
index = getFauxJointIndex(name);
|
||||||
|
@ -1775,7 +1776,6 @@ protected:
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QWriteLocker writeLock(&_jointDataLock);
|
|
||||||
if (_jointData.size() <= index) {
|
if (_jointData.size() <= index) {
|
||||||
_jointData.resize(index + 1);
|
_jointData.resize(index + 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue