improved constructor
This commit is contained in:
@ -30,9 +30,7 @@ namespace sc {
|
|||||||
|
|
||||||
class fdostream : public std::ostream {
|
class fdostream : public std::ostream {
|
||||||
public:
|
public:
|
||||||
fdostream(int fd) : std::ostream(nullptr), _buf(fd) {
|
fdostream(int fd) : std::ostream(&_buf), _buf(fd) {}
|
||||||
rdbuf(&_buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
fdoutbuf _buf;
|
fdoutbuf _buf;
|
||||||
|
Reference in New Issue
Block a user