summaryrefslogtreecommitdiffstats
path: root/src/DeadlockDetect.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/DeadlockDetect.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/DeadlockDetect.cpp b/src/DeadlockDetect.cpp
index 322084dc4..38a3c369e 100644
--- a/src/DeadlockDetect.cpp
+++ b/src/DeadlockDetect.cpp
@@ -112,18 +112,21 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age)
ASSERT(!"Unknown world in cDeadlockDetect");
return;
}
- if (itr->second.m_Age == a_Age)
+
+ cDeadlockDetect::sWorldAge & WorldAge = itr->second;
+
+ if (WorldAge.m_Age == a_Age)
{
- itr->second.m_NumCyclesSame += 1;
- if (itr->second.m_NumCyclesSame > (1000 * m_IntervalSec) / CYCLE_MILLISECONDS)
+ WorldAge.m_NumCyclesSame += 1;
+ if (WorldAge.m_NumCyclesSame > (1000 * m_IntervalSec) / CYCLE_MILLISECONDS)
{
DeadlockDetected();
}
}
else
{
- itr->second.m_Age = a_Age;
- itr->second.m_NumCyclesSame = 0;
+ WorldAge.m_Age = a_Age;
+ WorldAge.m_NumCyclesSame = 0;
}
}