This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Don't copy a set


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]