Changeset 1787


Ignore:
Timestamp:
Feb 9, 2009, 9:43:07 PM (11 years ago)
Author:
Peter
Message:

avoid copying in Vector istream constructor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Vector.cc

    r1680 r1787  
    8787      nof_rows++;
    8888
    89       std::vector<double> v;
     89      data_matrix.push_back(std::vector<double>());
     90      std::vector<double>& v=data_matrix.back();
    9091      std::string element;
    9192      std::stringstream ss(line);
     
    132133        throw utility::IO_error(s.str());
    133134      }
    134       data_matrix.push_back(v);
    135135    }
    136136
Note: See TracChangeset for help on using the changeset viewer.