Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.cpp

    r0a5beb ra7aebd  
    3535#include "CodePatterns/MemDebug.hpp"
    3636
    37 #include <algorithm>
     37#include <cstring>
    3838#include <boost/bind.hpp>
    3939#include <boost/foreach.hpp>
    40 #include <cstring>
    4140
    4241#include <gsl/gsl_inline.h>
     
    103102molecule::~molecule()
    104103{
    105   // inform all UI elements about imminent removal before anything is lost
    106   {
    107     OBSERVE;
    108     NOTIFY(AboutToBeRemoved);
    109   }
    110104  CleanupMolecule();
    111105};
     
    654648void removeAtomsinMolecule(molecule *&_mol)
    655649{
    656   // copy list of atoms from molecule as it will be changed
    657   std::vector<atom *> atoms;
    658   atoms.resize(_mol->getAtomCount(), NULL);
    659   std::copy(_mol->begin(), _mol->end(), atoms.begin());
    660650  // remove each atom from world
    661   for(std::vector<atom *>::iterator AtomRunner = atoms.begin();
    662       AtomRunner != atoms.end(); ++AtomRunner)
     651  for(molecule::iterator AtomRunner = _mol->begin(); !_mol->empty(); AtomRunner = _mol->begin())
    663652    World::getInstance().destroyAtom(*AtomRunner);
    664653  // make sure that pointer os not usable
     
    945934    output << "Map is ";
    946935    for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
    947       if ((*iter)->getFather() == NULL) {
     936      if ((*iter)->father == NULL) {
    948937        AtomicMap[(*iter)->getNr()] = -2;
    949938      } else {
     
    951940      //for (int i=0;i<AtomCount;i++) { // search atom
    952941        //for (int j=0;j<OtherMolecule->getAtomCount();j++) {
    953           //LOG(4, "Comparing father " << (*iter)->getFather() << " with the other one " << (*runner)->getFather() << ".");
    954           if ((*iter)->getFather() == (*runner))
     942          //LOG(4, "Comparing father " << (*iter)->father << " with the other one " << (*runner)->father << ".");
     943          if ((*iter)->father == (*runner))
    955944            AtomicMap[(*iter)->getNr()] = (*runner)->getNr();
    956945        }
Note: See TracChangeset for help on using the changeset viewer.