Remove ostream from class StreamBuffer

This commit is contained in:
2023-10-18 14:22:35 -04:00
parent 67b0265092
commit 3e8aa31a95
5 changed files with 46 additions and 59 deletions

View File

@@ -204,7 +204,7 @@ public:
// Obtain the output buffer of the stdio channel as an ostream.
//
std::ostream &stdostream() { return get_stdio_channel()->out()->ostream(); }
std::ostream &stdostream() { return *stdostream_; }
// Set the prompt for the console.
//
@@ -305,6 +305,7 @@ private:
SharedChannel channels_[DRV_MAX_CHAN];
int next_unused_chid_;
SharedChannel stdio_channel_;
std::unique_ptr<std::ostream> stdostream_;
eng::vector<SharedChannel> accepted_channels_;
eng::vector<uint32_t> new_outgoing_;
util::LuaSourcePtr lua_source_;