From: ehofman Date: Mon, 20 Oct 2003 12:14:10 +0000 (+0000) Subject: Last fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=94ac87f4f5aefa4900027cd0fcd29b99b24684f2;p=simgear.git Last fixes --- diff --git a/simgear/compatibility/sstream b/simgear/compatibility/sstream index cf6ac678..00463b1f 100644 --- a/simgear/compatibility/sstream +++ b/simgear/compatibility/sstream @@ -14,14 +14,11 @@ namespace std { public: ostringstream() { sstr = new std::ostrstream; } - ostringstream(const string &str, int=ios::out) { - sstr = new ostrstream((char *)str.c_str(), str.size(), ios::out); - } - ~ostringstream() { delete sstr->str(); delete sstr; } - std::string str() { - std::string _str = std::string(sstr->str()); _str.append('\0'); - return _str; + ostringstream(const string &str, int mode=ios::out) { + sstr = new ostrstream((char *)str.c_str(), str.size(), mode); } + ~ostringstream() { delete sstr; } + std::string str() { return std::string(sstr->str()); } int pcount() { return sstr->pcount(); } };