[patch] Don't copy a set
Cary Coutant
ccoutant@gmail.com
Thu Apr 2 22:59:00 GMT 2015
> This just avoids calling a copy constructor.
- Garbage_collection::Sections_reachable v = find_it->second;
+ const Garbage_collection::Sections_reachable &v = find_it->second;
// Scan the vector of references for each work_list entry.
- for (Garbage_collection::Sections_reachable::iterator it_v = v.begin();
+ for (Garbage_collection::Sections_reachable::const_iterator it_v =
+ v.begin();
Hmmm, I seem to remember fixing this, or something very much like
this, before. This is OK, with a ChangeLog entry. Thanks!
-cary
More information about the Binutils
mailing list