From ca28f9cfcbff0fbdb2afe96f1427245f83db7c47 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 1 Dec 2016 09:25:53 -0500 Subject: Allow objects to opt out of gc, don't gc accounts with users logged in Also store cached state with the field by using Serialize::Storage for field storage --- modules/chanserv/main/level.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/chanserv/main/level.h') diff --git a/modules/chanserv/main/level.h b/modules/chanserv/main/level.h index d22dc2831..1da1b26b5 100644 --- a/modules/chanserv/main/level.h +++ b/modules/chanserv/main/level.h @@ -21,13 +21,12 @@ class LevelImpl : public ChanServ::Level { friend class LevelType; - ChanServ::Channel *channel = nullptr; - Anope::string name; - int level = 0; + Serialize::Storage channel; + Serialize::Storage name; + Serialize::Storage level; public: - LevelImpl(Serialize::TypeBase *type) : ChanServ::Level(type) { } - LevelImpl(Serialize::TypeBase *type, Serialize::ID id) : ChanServ::Level(type, id) { } + using ChanServ::Level::Level; ChanServ::Channel *GetChannel() override; void SetChannel(ChanServ::Channel *) override; -- cgit