Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MoleculeAction/RotateAroundSelfByAngleAction.cpp

    r26b4d62 r833b15  
    7474
    7575    // Creation Line that is the rotation axis
    76     Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
    77     LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
    78     Line RotationAxis(*CenterOfGravity, params.Axis.get());
    79     delete(CenterOfGravity);
     76    const Vector CenterOfGravity = mol->DetermineCenterOfGravity();
     77    LOG(0,  "Center of gravity is " << CenterOfGravity << ".");
     78    Line RotationAxis(CenterOfGravity, params.Axis.get());
    8079    LOG(0, "Rotate " << mol->getName() << " around self by " << params.angle.get() << " radian around axis " << RotationAxis << ".");
    8180
     
    9392
    9493  BOOST_FOREACH(molecule *mol, state->selectedMolecules) {
    95     Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
    96     LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
    97     Line RotationAxis(*CenterOfGravity, state->params.Axis.get());
    98     delete(CenterOfGravity);
     94    const Vector CenterOfGravity = mol->DetermineCenterOfGravity();
     95    LOG(0,  "Center of gravity is " <<CenterOfGravity << ".");
     96    Line RotationAxis(CenterOfGravity, state->params.Axis.get());
    9997    LOG(0, "Rotate " << mol->getName() << " around self by " << -state->params.angle.get() << " radian around axis " << RotationAxis << ".");
    10098
     
    111109
    112110  BOOST_FOREACH(molecule *mol, state->selectedMolecules) {
    113     Vector *CenterOfGravity = mol->DetermineCenterOfGravity();
    114     LOG(0,  "Center of gravity is " << *CenterOfGravity << ".");
    115     Line RotationAxis(*CenterOfGravity, state->params.Axis.get());
    116     delete(CenterOfGravity);
     111    const Vector CenterOfGravity = mol->DetermineCenterOfGravity();
     112    LOG(0,  "Center of gravity is " << CenterOfGravity << ".");
     113    Line RotationAxis(CenterOfGravity, state->params.Axis.get());
    117114    LOG(0, "Rotate " << mol->getName() << " around self by " << state->params.angle.get() << " radian around axis " << RotationAxis << ".");
    118115
Note: See TracChangeset for help on using the changeset viewer.