Reset is more analogous to re-initilization which is the intent.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
StackStringStream& operator=(StackStringStream&& o) = delete;
~StackStringStream() override = default;
- void clear() {
- basic_ostream<char>::clear();
+ void reset() {
+ clear(); /* reset state flags */
ssb.clear();
}
} else {
osp = std::move(cache.c.back());
cache.c.pop_back();
- osp->clear();
+ osp->reset();
}
}
CachedStackStringStream(const CachedStackStringStream&) = delete;