Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions inst/include/Rcpp/iostream/Rstreambuf.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,11 @@ namespace Rcpp {
template <bool OUTPUT>
class Rostream : public std::ostream {
typedef Rstreambuf<OUTPUT> Buffer ;
Buffer* buf ;
Buffer buf ;
public:
Rostream() :
std::ostream( new Buffer ),
buf( static_cast<Buffer*>( rdbuf() ) )
std::ostream( &buf )
{}
~Rostream() {
if (buf != NULL) {
delete buf;
buf = NULL;
}
}
};
// #nocov start
template <> inline std::streamsize Rstreambuf<true>::xsputn(const char *s, std::streamsize num ) {
Expand Down