~ubuntu-branches/ubuntu/karmic/aspectc++/karmic

« back to all changes in this revision

Viewing changes to AspectC++/AdviceRepo.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2006-06-03 13:14:38 UTC
  • Revision ID: james.westby@ubuntu.com-20060603131438-76kcwaewxnwlvkad
Tags: 0.99+1.0pre3-2
* Fix some more cleanup() functions, which can go frenzy on at least amd64
  (applied upstread)
* Fix description, thanks to Simon Waters (Closes: #362738)
* reweave Puma to make the patch enabling the build with gcc-4.1 actually
  active (Closes: #357901, this time for real)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
17
17
// MA  02111-1307  USA                                            
18
18
 
 
19
#include <list>
19
20
#include "AdviceRepo.h"
20
21
#include "RepoXMLNode.h"
21
22
 
41
42
}
42
43
 
43
44
void AdviceRepo::cleanup (set<int> files) {
 
45
  std::list<RepoPosAspectKey> to_delete;
44
46
  for (Map::iterator curr = _map.begin (); curr != _map.end (); ++curr) {
45
47
    Data &data = (*curr).second;
46
48
    const RepoPosAspectKey &key = (*curr).first;
47
49
    if (!data._ref && files.count (key.file_id ()) == 1) {
48
 
      _map.erase (curr);
 
50
      to_delete.push_back(key);
49
51
    }
50
52
  }
 
53
  list<RepoPosAspectKey>::iterator c;
 
54
  for (c = to_delete.begin(); c != to_delete.end(); ++c) {
 
55
    _map.erase(*c);
 
56
  }
51
57
}
52
58
 
53
59
void AdviceRepo::make_xml (RepoXMLNode parent) {