From 4db3e6995c0284888729be0602a39c959f9359c6 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sat, 15 Feb 2020 16:37:46 +0100 Subject: [PATCH] improved constructor --- fdostream.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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;