diff options
author | 2018-06-20 14:30:08 +0100 | |
---|---|---|
committer | 2018-06-21 13:46:50 +0100 | |
commit | 54159c6c6fe529a55ef3d15a3c8418362d5a43fb (patch) | |
tree | 2ec461de8ec15383134f4c6e209f4b8a33854277 /runtime/class_linker.cc | |
parent | 44217b253bf4e5990de7051129ecda34f94d7f25 (diff) |
Use HashSet<std::string> instead of unordered_set<>.
Change the default parameters for HashSet<std::string> to
allow passing StringPiece as a key, avoiding an unnecessary
allocation. Use the HashSet<std::string> instead of
std::unordered_set<std::string>. Rename HashSet<> functions
that mirror std::unordered_multiset<> to lower-case.
Fix CompilerDriver::LoadImageClasses() to avoid using
invalidated iterator.
Test: m test-art-host-gtest
Test: testrunner.py --host
Change-Id: I7f8b82ee0b07befc5a0ee1c420b08a2068ad931e
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index c374e03ed7..1172bb1c08 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -1242,12 +1242,12 @@ void AppImageClassLoadersAndDexCachesHelper::Update( ObjPtr<mirror::Class> klass = types[j].load(std::memory_order_relaxed).object.Read(); if (space->HasAddress(klass.Ptr())) { DCHECK(!klass->IsErroneous()) << klass->GetStatus(); - auto it = new_class_set->Find(ClassTable::TableSlot(klass)); + auto it = new_class_set->find(ClassTable::TableSlot(klass)); DCHECK(it != new_class_set->end()); DCHECK_EQ(it->Read(), klass); ObjPtr<mirror::Class> super_class = klass->GetSuperClass(); if (super_class != nullptr && !heap->ObjectIsInBootImageSpace(super_class)) { - auto it2 = new_class_set->Find(ClassTable::TableSlot(super_class)); + auto it2 = new_class_set->find(ClassTable::TableSlot(super_class)); DCHECK(it2 != new_class_set->end()); DCHECK_EQ(it2->Read(), super_class); } |