[wpiutil] raw_uv_ostream: Add reset() (#3701)

This enables reuse of a raw_uv_ostream object.
This commit is contained in:
Peter Johnson
2021-11-01 07:47:13 -07:00
committed by GitHub
parent d7b1e3576f
commit 52f2d580eb

View File

@@ -53,6 +53,11 @@ class raw_uv_ostream : public raw_ostream {
void flush() = delete;
/**
* Resets the amount of allocated space.
*/
void reset() { m_left = 0; }
private:
void write_impl(const char* data, size_t len) override;
uint64_t current_pos() const override;