Simplify Garbage_collection::add_reference a bit.
this->section_reloc_map_[src_id] is created if it doesn't exist, so there is no point in doing a find.
This commit is contained in:
parent
e0a1e121b3
commit
3a935c6cf9
2 changed files with 6 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
2015-02-17 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
|
||||
|
||||
* gc.h (Garbage_collection::add_reference): Don't use find.
|
||||
|
||||
2015-02-17 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
|
||||
|
||||
* object.cc (write_local_symbols): avoid std::vector copy.
|
||||
|
|
|
@ -109,11 +109,8 @@ class Garbage_collection
|
|||
{
|
||||
Section_id src_id(src_object, src_shndx);
|
||||
Section_id dst_id(dst_object, dst_shndx);
|
||||
Section_ref::iterator p = this->section_reloc_map_.find(src_id);
|
||||
if (p == this->section_reloc_map_.end())
|
||||
this->section_reloc_map_[src_id].insert(dst_id);
|
||||
else
|
||||
p->second.insert(dst_id);
|
||||
Sections_reachable& reachable = this->section_reloc_map_[src_id];
|
||||
reachable.insert(dst_id);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue