]> git.mxchange.org Git - simgear.git/commitdiff
Make it easy on myself (and make it work as a bonus)
authorehofman <ehofman>
Mon, 20 Oct 2003 19:32:50 +0000 (19:32 +0000)
committerehofman <ehofman>
Mon, 20 Oct 2003 19:32:50 +0000 (19:32 +0000)
simgear/compatibility/sstream

index 00463b1fc5dd01e0b1314cb8696ae9c062391679..2eb051958a77a9ffbbc24bdfe6d16e1f6c854873 100644 (file)
@@ -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 {
    };