THRIFT-2074 cppcheck error removed from ThreadManager.cpp
Patch: Konrad Grochowski
diff --git a/lib/cpp/src/thrift/concurrency/ThreadManager.cpp b/lib/cpp/src/thrift/concurrency/ThreadManager.cpp
index 298dbac..f2c0fa5 100644
--- a/lib/cpp/src/thrift/concurrency/ThreadManager.cpp
+++ b/lib/cpp/src/thrift/concurrency/ThreadManager.cpp
@@ -446,8 +446,8 @@
     }
 
     for (std::set<shared_ptr<Thread> >::iterator ix = deadWorkers_.begin(); ix != deadWorkers_.end(); ix++) {
-      workers_.erase(*ix);
       idMap_.erase((*ix)->getId());
+      workers_.erase(*ix);
     }
 
     deadWorkers_.clear();