~ubuntu-branches/ubuntu/lucid/aspectc++/lucid

« back to all changes in this revision

Viewing changes to AspectC++/AspectRepo.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 "AspectRepo.h"
20
21
#include "RepoXMLNode.h"
21
22
 
40
41
}
41
42
 
42
43
void AspectRepo::cleanup (set<int> files) {
 
44
  list<RepoPosKey> to_delete;
43
45
  for (Map::iterator curr = _map.begin (); curr != _map.end (); ++curr) {
44
46
    Data &data = (*curr).second;
45
47
    const RepoPosKey &key = (*curr).first;
46
48
    if (!data._ref && files.count (key.file_id ()) == 1) {
47
 
      _map.erase (curr);
 
49
      to_delete.push_back(key);
48
50
    }
49
51
  }
 
52
  list<RepoPosKey>::iterator c;
 
53
  for (c = to_delete.begin(); c != to_delete.end(); ++c) {
 
54
    _map.erase(*c);
 
55
  }
50
56
}
51
57
 
52
58
void AspectRepo::make_xml (RepoXMLNode parent) {