Skip to content

Commit

Permalink
remove per-row tellp()
Browse files Browse the repository at this point in the history
  • Loading branch information
spoonincode committed Jan 2, 2024
1 parent 574f430 commit 53130ef
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions libraries/chain/snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,7 @@ void ostream_snapshot_writer::write_start_section( const std::string& section_na
}

void ostream_snapshot_writer::write_row( const detail::abstract_snapshot_row_writer& row_writer ) {
auto restore = snapshot.tellp();
try {
row_writer.write(snapshot);
} catch (...) {
snapshot.seekp(restore);
throw;
}
row_writer.write(snapshot);
row_count++;
}

Expand Down

0 comments on commit 53130ef

Please sign in to comment.