]> khamidou — GitHub mirrors - electron.git/commitdiff
Ranged for is not supported by VS 2010.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 1 Jul 2013 13:54:18 +0000 (21:54 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 1 Jul 2013 13:54:18 +0000 (21:54 +0800)
common/api/atom_api_id_weak_map.cc

index 6b356b8a22e18f8a06d641db4dc93a1876ba1e50..b6497f7149242a255d7d15775c564320d24387e8 100644 (file)
@@ -17,8 +17,8 @@ IDWeakMap::~IDWeakMap() {
   v8::Isolate* isolate = v8::Isolate::GetCurrent();
 
   auto copied_map = map_;
-  for (const auto& el : copied_map)
-    Erase(isolate, el.first);
+  for (auto el = copied_map.begin(); el != copied_map.end(); ++el)
+    Erase(isolate, el->first);
 }
 
 bool IDWeakMap::Has(int key) const {
@@ -109,8 +109,8 @@ v8::Handle<v8::Value> IDWeakMap::Keys(const v8::Arguments& args) {
   v8::Handle<v8::Array> keys = v8::Array::New(obj->map_.size());
 
   int i = 0;
-  for (const auto& el : obj->map_) {
-    keys->Set(i, v8::Integer::New(el.first));
+  for (auto el = obj->map_.begin(); el != obj->map_.end(); ++ el) {
+    keys->Set(i, v8::Integer::New(el->first));
     ++i;
   }