Changeset 3994


Ignore:
Timestamp:
Sep 22, 2020, 5:54:15 AM (21 months ago)
Author:
Peter
Message:

simplify code

File:
1 edited

Legend:

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

    r3993 r3994  
    633633  {
    634634    detail::VectorPusher<T> pusher;
    635     bool ok=true;
    636635    while(true) {
    637636      std::string element;
    638637      if(sep=='\0')
    639         ok=!(is>>element).fail();
     638        is>>element;
    640639      else
    641         ok=!getline(is, element, sep).fail();
    642       if(!ok)
     640        getline(is, element, sep);
     641      if(is.fail())
    643642        break;
    644643      pusher(std::move(element), vec);
Note: See TracChangeset for help on using the changeset viewer.