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