World serialization done (not well-tested yet)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user