From: ehofman Date: Mon, 20 Oct 2003 19:32:50 +0000 (+0000) Subject: Make it easy on myself (and make it work as a bonus) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=66fb6b5a1ce101a51fac6d6c83ac26ee3a98f9d5;p=simgear.git Make it easy on myself (and make it work as a bonus) --- diff --git a/simgear/compatibility/sstream b/simgear/compatibility/sstream index 00463b1f..2eb05195 100644 --- a/simgear/compatibility/sstream +++ b/simgear/compatibility/sstream @@ -8,20 +8,12 @@ namespace std { - class ostringstream : public strstreambase, public iostream { - private: - std::ostrstream *sstr; - + class ostringstream : public ostrstream { public: - ostringstream() { sstr = new std::ostrstream; } - 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(); } + std::string str() { return string(ostrstream::str()) + '\0'; } }; + class istringstream : public istrstream { };