again: std::ends and stringstream

This commit is contained in:
maartenkeijzer 2003-03-21 02:41:54 +00:00
commit 6f98944212
2 changed files with 6 additions and 3 deletions

View file

@ -188,10 +188,11 @@ string eoState::createObjectName(eoObject* obj)
{ {
#ifdef HAVE_SSTREAM #ifdef HAVE_SSTREAM
ostringstream os; ostringstream os;
os << obj->className().c_str() << count++;
#else #else
ostrstream os; ostrstream os;
#endif
os << obj->className().c_str() << count++ << ends; os << obj->className().c_str() << count++ << ends;
#endif
name = os.str(); name = os.str();

View file

@ -23,10 +23,11 @@ void eoTimedStateSaver::operator()(void)
#ifdef HAVE_SSTREAM #ifdef HAVE_SSTREAM
ostringstream os; ostringstream os;
os << prefix << (now - first_time) << '.' << extension;
#else #else
ostrstream os; ostrstream os;
#endif
os << prefix << (now - first_time) << '.' << extension << ends; os << prefix << (now - first_time) << '.' << extension << ends;
#endif
state.save(os.str()); state.save(os.str());
} }
} }
@ -35,10 +36,11 @@ void eoCountedStateSaver::doItNow(void)
{ {
#ifdef HAVE_SSTREAM #ifdef HAVE_SSTREAM
ostringstream os; ostringstream os;
os << prefix << counter << '.' << extension;
#else #else
ostrstream os; ostrstream os;
#endif
os << prefix << counter << '.' << extension << ends; os << prefix << counter << '.' << extension << ends;
#endif
state.save(os.str()); state.save(os.str());
} }