Changeset 2269


Ignore:
Timestamp:
Jun 14, 2010, 5:16:06 AM (11 years ago)
Author:
Peter
Message:

optimization. return as early as possible

File:
1 edited

Legend:

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

    r2208 r2269  
    4444    ss >> s2; // to trim surrounding whitespaces
    4545    to_lower(s2);
     46    if (s2!=other)
     47      return false;
    4648    // Check that nothing is left on stream
    4749    std::string s3;
    4850    ss >> s3;
    49     if(s3.size())
    50       return false;
    51     return (other==s2);
     51    return s3.empty();
    5252  }
    5353
Note: See TracChangeset for help on using the changeset viewer.