Changes in src/moleculelist.cpp [a3fded:274d45]
- File:
-
- 1 edited
-
src/moleculelist.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/moleculelist.cpp
ra3fded r274d45 5 5 */ 6 6 7 #include "Helpers/MemDebug.hpp" 8 7 9 #include <cstring> 8 10 … … 10 12 #include "atom.hpp" 11 13 #include "bond.hpp" 12 #include "bondgraph.hpp"13 14 #include "boundary.hpp" 14 15 #include "config.hpp" … … 30 31 */ 31 32 MoleculeListClass::MoleculeListClass(World *_world) : 33 Observable("MoleculeListClass"), 32 34 world(_world) 33 35 { … … 210 212 211 213 // put all molecules of src into mol 212 molecule::iterator runner; 213 for (molecule::iterator iter = srcmol->begin(); iter != srcmol->end(); ++iter) { 214 runner = iter++; 215 srcmol->UnlinkAtom((*runner)); 216 mol->AddAtom((*runner)); 214 for (molecule::iterator iter = srcmol->begin(); !srcmol->empty(); iter=srcmol->begin()) { 215 atom * const Walker = *iter; 216 srcmol->UnlinkAtom(Walker); 217 mol->AddAtom(Walker); 217 218 } 218 219 … … 257 258 status = status && SimpleMerge(mol, srcmol); 258 259 } 260 insert(mol); 259 261 return status; 260 262 };
Note:
See TracChangeset
for help on using the changeset viewer.
