Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: runtime/vm/kernel_reader.h

Issue 2654983002: Revert "Revert "Revert "Removed usage of std::map and std::vector from kernel code. Issue #28064.""" (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/kernel_binary.cc ('k') | runtime/vm/kernel_to_il.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_reader.h
diff --git a/runtime/vm/kernel_reader.h b/runtime/vm/kernel_reader.h
index 69065084b631db2f5783527ce099c9172835013f..3d20f90a6e245f7160e546bec58d5a8f7c9ac1f7 100644
--- a/runtime/vm/kernel_reader.h
+++ b/runtime/vm/kernel_reader.h
@@ -34,18 +34,18 @@ template <typename KernelType, typename VmType>
class Mapping {
public:
bool Lookup(KernelType* node, VmType** handle) {
- typename MapType::Pair* pair = map_.LookupPair(node);
- if (pair != NULL) {
- *handle = pair->value;
+ typename MapType::iterator value = map_.find(node);
+ if (value != map_.end()) {
+ *handle = value->second;
return true;
}
return false;
}
- void Insert(KernelType* node, VmType* object) { map_.Insert(node, object); }
+ void Insert(KernelType* node, VmType* object) { map_[node] = object; }
private:
- typedef Map<KernelType, VmType*> MapType;
+ typedef typename std::map<KernelType*, VmType*> MapType;
MapType map_;
};
« no previous file with comments | « runtime/vm/kernel_binary.cc ('k') | runtime/vm/kernel_to_il.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698