Ignore:
Timestamp:
04/29/11 13:25:45 (14 years ago)
Author:
tbretz
Message:
Use stringstreams to replace Form not strings and +=
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/StateMachineImp.cc

    r10497 r10498  
    715715    const StateNames::const_iterator i = fStateNames.find(state);
    716716
    717     string rc;
    718     rc += state;
    719     return i==fStateNames.end() || i->second.first.empty() ? rc : i->second.first;
     717    ostringstream s;
     718    s << state;
     719    return i==fStateNames.end() || i->second.first.empty() ? s.str() : i->second.first;
    720720}
    721721
     
    754754    const string &str = GetStateName(state);
    755755
    756     string s;
    757     s += state;
    758     if (str==s)
     756    ostringstream s;
     757    s << state;
     758    if (str==s.str())
    759759        return str;
    760760
    761     return str.empty() ? s : (str+'['+s+']');
     761    return str.empty() ? s.str() : (str+'['+s.str()+']');
    762762}
    763763
Note: See TracChangeset for help on using the changeset viewer.