World serialization done (not well-tested yet)

This commit is contained in:
2021-03-16 12:19:37 -04:00
parent 7c9fd1e46b
commit a64e339b6b
8 changed files with 111 additions and 52 deletions

View File

@@ -122,21 +122,4 @@ void LuaSnap::deserialize(StreamBuffer *sb) {
// functionality. So for now, we're sticking with this design, which doesn't
// require us to maintain any additional code.
bool LuaSnap::have_snapshot() const {
return snapshot_.write_count() != 0;
}
void LuaSnap::snapshot() {
assert(snapshot_.write_count() == 0);
serialize(&snapshot_);
}
void LuaSnap::rollback() {
assert(snapshot_.write_count() != 0);
deserialize(&snapshot_);
assert(snapshot_.at_eof());
snapshot_.clear();
}