Changeset 10498 for trunk/FACT++/src
- Timestamp:
- 04/29/11 13:25:45 (14 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Console.cc
r10496 r10498 13 13 #include "Console.h" 14 14 15 #include <sstream> 15 16 #include <iostream> 16 17 … … 134 135 const string siz = fLogO.GetSizeStr(); 135 136 136 string rc = "[";137 rc +=GetLine();138 return fContinous ? rc+']' : rc+':'+siz+']';137 ostringstream str; 138 str << '[' << GetLine(); 139 return fContinous ? str.str()+']' : str.str()+':'+siz+']'; 139 140 } 140 141 -
trunk/FACT++/src/Readline.cc
r10496 r10498 55 55 #include "Readline.h" 56 56 57 #include <sstream> 57 58 #include <fstream> 58 59 #include <iostream> … … 536 537 string Readline::GetLinePrompt() const 537 538 { 538 string rc = "[";539 rc += fLine;540 return rc+"]";539 ostringstream str; 540 str << '[' << fLine << ']'; 541 return str.str(); 541 542 } 542 543 -
trunk/FACT++/src/ReadlineWindow.cc
r10496 r10498 37 37 #include "Shell.h" 38 38 39 #include <sstream> 39 40 #include <iostream> 40 41 #include <string.h> // strlen … … 290 291 291 292 // Compile a proper format string 292 string fmt = "%-"; 293 fmt += max; 294 fmt + 's'; 293 ostringstream fmt; 294 fmt << "%-" << max << 's'; 295 295 296 296 // loop over all entries and display them … … 307 307 308 308 // Display an entry 309 wprintw(fWindow, fmt. c_str(), matches[i+1]);309 wprintw(fWindow, fmt.str().c_str(), matches[i+1]); 310 310 } 311 311 -
trunk/FACT++/src/StateMachineImp.cc
r10497 r10498 715 715 const StateNames::const_iterator i = fStateNames.find(state); 716 716 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; 720 720 } 721 721 … … 754 754 const string &str = GetStateName(state); 755 755 756 strings;757 s +=state;758 if (str==s )756 ostringstream s; 757 s << state; 758 if (str==s.str()) 759 759 return str; 760 760 761 return str.empty() ? s : (str+'['+s+']');761 return str.empty() ? s.str() : (str+'['+s.str()+']'); 762 762 } 763 763 -
trunk/FACT++/src/WindowLog.cc
r10496 r10498 16 16 #include "WindowLog.h" 17 17 18 #include <sstream> 18 19 #include <iostream> 19 20 #include <algorithm> … … 274 275 } 275 276 276 string rc;277 rc += s;278 return rc + u;277 ostringstream str; 278 str << s << u; 279 return str.str(); 279 280 } 280 281
Note:
See TracChangeset
for help on using the changeset viewer.