Working around useless c++ streams.
This commit is contained in:
parent
d3d866c92f
commit
bc222d2cf1
1 changed files with 5 additions and 0 deletions
|
@ -74,10 +74,15 @@ bool fetch_object (T & object, std::iostream & stream_a)
|
|||
error = object.deserialize_json (updated, tree);
|
||||
if (!error && updated)
|
||||
{
|
||||
auto end (stream_a.tellp ());
|
||||
stream_a.seekp (0);
|
||||
try
|
||||
{
|
||||
boost::property_tree::write_json (stream_a, tree);
|
||||
while (stream_a.tellp () != end)
|
||||
{
|
||||
stream_a << ' ';
|
||||
}
|
||||
}
|
||||
catch (std::runtime_error const &)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue