730c730,731
< std::list<unsigned>::iterator threads = (*activeThreads).begin();
---
> std::list<unsigned>::iterator threads = activeThreads->begin();
> std::list<unsigned>::iterator end = activeThreads->end();
732,733c733
< while (threads != (*activeThreads).end()) {
<
---
> while (threads != end) {
788c788,789
< std::list<unsigned>::iterator threads = (*activeThreads).begin();
---
> std::list<unsigned>::iterator threads = activeThreads->begin();
> std::list<unsigned>::iterator end = activeThreads->end();
793c794
< while (threads != (*activeThreads).end()) {
---
> while (threads != end) {
1316c1317,1319
< int tid = *((*activeThreads).begin());
---
> std::list<unsigned>::iterator thread = activeThreads->begin();
> assert(thread != activeThreads->end());
> int tid = *thread;
1366c1369,1370
< std::list<unsigned>::iterator threads = (*activeThreads).begin();
---
> std::list<unsigned>::iterator threads = activeThreads->begin();
> std::list<unsigned>::iterator end = activeThreads->end();
1368c1372
< while (threads != (*activeThreads).end()) {
---
> while (threads != end) {
1395a1400,1401
> std::list<unsigned>::iterator threads = activeThreads->begin();
> std::list<unsigned>::iterator end = activeThreads->end();
1397,1399c1403
< std::list<unsigned>::iterator threads = (*activeThreads).begin();
<
< while (threads != (*activeThreads).end()) {
---
> while (threads != end) {
1425c1429,1432
< std::list<unsigned>::iterator threads = (*activeThreads).begin();
---
> std::list<unsigned>::iterator thread = activeThreads->begin();
> assert(thread != activeThreads->end());
> unsigned tid = *thread;
>
1427c1434
< return *threads;
---
> return 0 * tid;