THRIFT-464. cpp: Fix some STL misuse in the concurrency library

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781627 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/TimerManager.cpp b/lib/cpp/src/concurrency/TimerManager.cpp
index 861a62f..003e315 100644
--- a/lib/cpp/src/concurrency/TimerManager.cpp
+++ b/lib/cpp/src/concurrency/TimerManager.cpp
@@ -208,9 +208,7 @@
 
   if (doStop) {
     // Clean up any outstanding tasks
-    for (task_iterator ix =  taskMap_.begin(); ix != taskMap_.end(); ix++) {
-      taskMap_.erase(ix);
-    }
+    taskMap_.clear();
 
     // Remove dispatcher's reference to us.
     dispatcher_->manager_ = NULL;