Changeset 3993


Ignore:
Timestamp:
Sep 21, 2020, 7:42:52 AM (22 months ago)
Author:
Peter
Message:

simplify code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/utility.h

    r3963 r3993  
    604604      if (line.empty() && ignore_empty)
    605605        continue;
    606       matrix.push_back(std::vector<T>());
    607       std::vector<T>& v=matrix.back();
     606      std::vector<T> v;
    608607      v.reserve(nof_columns);
    609608      bool empty_last_element = !line.empty() && line.back()==sep;
     
    623622      }
    624623      nof_columns = std::max(nof_columns, v.size());
     624      matrix.push_back(std::move(v));
    625625    }
    626626
Note: See TracChangeset for help on using the changeset viewer.