Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TremoloParser.cpp

    rd74077 re97a44  
    99
    1010#include "Helpers/Assert.hpp"
     11#include "Helpers/Log.hpp"
     12#include "Helpers/Verbose.hpp"
    1113#include "TremoloParser.hpp"
    1214#include "World.hpp"
     
    2123
    2224using namespace std;
    23 using namespace boost;
    2425
    2526/**
     
    99100 */
    100101void TremoloParser::save(ostream* file) {
     102  DoLog(0) && (Log() << Verbose(0) << "Saving changes to tremolo." << std::endl);
     103
    101104  vector<atom*>::iterator atomIt;
    102105  vector<string>::iterator it;
     
    140143      case TremoloKey::x :
    141144        // for the moment, assume there are always three dimensions
    142         *file << currentAtom->at(0) << "\t";
    143         *file << currentAtom->at(1) << "\t";
    144         *file << currentAtom->at(2) << "\t";
     145        *file << currentAtom->x[0] << "\t";
     146        *file << currentAtom->x[1] << "\t";
     147        *file << currentAtom->x[2] << "\t";
    145148        break;
    146149      case TremoloKey::u :
    147150        // for the moment, assume there are always three dimensions
    148         *file << currentAtom->AtomicVelocity[0] << "\t";
    149         *file << currentAtom->AtomicVelocity[1] << "\t";
    150         *file << currentAtom->AtomicVelocity[2] << "\t";
     151        *file << currentAtom->v[0] << "\t";
     152        *file << currentAtom->v[1] << "\t";
     153        *file << currentAtom->v[2] << "\t";
    151154        break;
    152155      case TremoloKey::Type :
     
    225228  string word;
    226229  int oldId;
    227   double tmp;
    228230
    229231  lineStream << line;
     
    233235      case TremoloKey::x :
    234236        // for the moment, assume there are always three dimensions
    235         for (int i=0;i<NDIM;i++) {
    236           lineStream >> tmp;
    237           newAtom->set(i, tmp);
    238         }
     237        lineStream >> newAtom->x[0];
     238        lineStream >> newAtom->x[1];
     239        lineStream >> newAtom->x[2];
    239240        break;
    240241      case TremoloKey::u :
    241242        // for the moment, assume there are always three dimensions
    242         lineStream >> newAtom->AtomicVelocity[0];
    243         lineStream >> newAtom->AtomicVelocity[1];
    244         lineStream >> newAtom->AtomicVelocity[2];
     243        lineStream >> newAtom->v[0];
     244        lineStream >> newAtom->v[1];
     245        lineStream >> newAtom->v[2];
    245246        break;
    246247      case TremoloKey::Type :
Note: See TracChangeset for help on using the changeset viewer.