Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/XyzParser.cpp

    rdf481f r112b09  
    2727 */
    2828XyzParser::~XyzParser() {
     29  delete(&comment);
    2930}
    3031
     
    5758 */
    5859void XyzParser::save(ostream* file) {
    59   if (comment == "") {
    60     time_t now = time((time_t *)NULL);   // Get the system time and put it into 'now' as 'calender time'
    61     comment = "\tCreated by molecuilder on ";
    62     // ctime ends in \n\0, we have to cut away the newline
    63     std::string time(ctime(&now));
    64     size_t pos = time.find('\n');
    65     if (pos != 0)
    66       comment += time.substr(0,pos);
    67     else
    68       comment += time;
    69   }
    7060  *file << World::getInstance().numAtoms() << endl << comment << endl;
    7161
    7262  vector<atom*> atoms = World::getInstance().getAllAtoms();
    7363  for(vector<atom*>::iterator it = atoms.begin(); it != atoms.end(); it++) {
    74     *file << noshowpoint << (*it)->getType()->symbol << "\t" << (*it)->x[0] << "\t" << (*it)->x[1] << "\t" << (*it)->x[2] << endl;
     64    *file << fixed << (*it)->getType()->symbol << "\t" << (*it)->x[0] << "\t" << (*it)->x[1] << "\t" << (*it)->x[2] << endl;
    7565  }
    7666}
Note: See TracChangeset for help on using the changeset viewer.