diff --git a/fdostream.hpp b/fdostream.hpp index 531890b..edc5157 100644 --- a/fdostream.hpp +++ b/fdostream.hpp @@ -30,9 +30,7 @@ namespace sc { class fdostream : public std::ostream { public: - fdostream(int fd) : std::ostream(nullptr), _buf(fd) { - rdbuf(&_buf); - } + fdostream(int fd) : std::ostream(&_buf), _buf(fd) {} private: fdoutbuf _buf;