improved constructor
This commit is contained in:
parent
260fba5ef7
commit
4db3e6995c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user