Ignore:
Timestamp:
Jan 28, 2010, 1:54:35 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
03d7ac
Parents:
d34341
git-author:
Tillmann Crueger <crueger@…> (01/28/10 13:02:49)
git-committer:
Tillmann Crueger <crueger@…> (01/28/10 13:54:35)
Message:

Added possibility to query doubles and vectors using dialogs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/vector.cpp

    rd34341 rdbd19f  
    663663};
    664664
     665Vector& Vector::operator=(const Vector& src) {
     666  CopyVector(src);
     667  return *this;
     668}
     669
    665670/** Prints a 3dim vector.
    666671 * prints no end of line.
     
    10761081void Vector::CopyVector(const Vector * const y)
    10771082{
    1078   for (int i=NDIM;i--;)
    1079     this->x[i] = y->x[i];
     1083  // check for self assignment
     1084  if(y!=this){
     1085    for (int i=NDIM;i--;)
     1086      this->x[i] = y->x[i];
     1087  }
    10801088}
    10811089
     
    10851093void Vector::CopyVector(const Vector &y)
    10861094{
    1087   for (int i=NDIM;i--;)
    1088     this->x[i] = y.x[i];
     1095  // check for self assignment
     1096  if(&y!=this) {
     1097    for (int i=NDIM;i--;)
     1098      this->x[i] = y.x[i];
     1099  }
    10891100}
    10901101
Note: See TracChangeset for help on using the changeset viewer.