diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index e8eec0dd..814a4aaa 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -188,10 +188,11 @@ string eoState::createObjectName(eoObject* obj) { #ifdef HAVE_SSTREAM ostringstream os; + os << obj->className().c_str() << count++; #else ostrstream os; -#endif os << obj->className().c_str() << count++ << ends; +#endif name = os.str(); diff --git a/eo/src/utils/eoUpdater.cpp b/eo/src/utils/eoUpdater.cpp index dd30b4b4..64b07dfc 100644 --- a/eo/src/utils/eoUpdater.cpp +++ b/eo/src/utils/eoUpdater.cpp @@ -23,10 +23,11 @@ void eoTimedStateSaver::operator()(void) #ifdef HAVE_SSTREAM ostringstream os; + os << prefix << (now - first_time) << '.' << extension; #else ostrstream os; -#endif os << prefix << (now - first_time) << '.' << extension << ends; +#endif state.save(os.str()); } } @@ -35,10 +36,11 @@ void eoCountedStateSaver::doItNow(void) { #ifdef HAVE_SSTREAM ostringstream os; + os << prefix << counter << '.' << extension; #else ostrstream os; -#endif os << prefix << counter << '.' << extension << ends; +#endif state.save(os.str()); }