diff options
| author | Sadie Powell <sadie@witchery.services> | 2025-05-16 15:18:00 +0100 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2025-05-16 15:18:00 +0100 |
| commit | be5a0e8108cb5d17b4e36f5858e1700ccb645c8b (patch) | |
| tree | 759d3f6b08f73895df1d0017b70b11d223db1eb5 /modules/chanserv | |
| parent | 3da8244de5d013cc9c390c194c195f5c4a81a0da (diff) | |
Serialize using mutable objects not immutable ones.
Diffstat (limited to 'modules/chanserv')
| -rw-r--r-- | modules/chanserv/cs_entrymsg.cpp | 2 | ||||
| -rw-r--r-- | modules/chanserv/cs_log.cpp | 2 | ||||
| -rw-r--r-- | modules/chanserv/cs_mode.cpp | 4 | ||||
| -rw-r--r-- | modules/chanserv/cs_seen.cpp | 2 | ||||
| -rw-r--r-- | modules/chanserv/cs_set_misc.cpp | 2 | ||||
| -rw-r--r-- | modules/chanserv/cs_suspend.cpp | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/modules/chanserv/cs_entrymsg.cpp b/modules/chanserv/cs_entrymsg.cpp index ac83e45f1..db247a05f 100644 --- a/modules/chanserv/cs_entrymsg.cpp +++ b/modules/chanserv/cs_entrymsg.cpp @@ -39,7 +39,7 @@ struct EntryMsgTypeImpl final { } - void Serialize(const Serializable *obj, Serialize::Data &data) const override + void Serialize(Serializable *obj, Serialize::Data &data) const override { const auto *msg = static_cast<const EntryMsgImpl *>(obj); data.Store("ci", msg->chan); diff --git a/modules/chanserv/cs_log.cpp b/modules/chanserv/cs_log.cpp index b33a1bf44..797c1df35 100644 --- a/modules/chanserv/cs_log.cpp +++ b/modules/chanserv/cs_log.cpp @@ -44,7 +44,7 @@ struct LogSettingTypeImpl final { } - void Serialize(const Serializable *obj, Serialize::Data &data) const override + void Serialize(Serializable *obj, Serialize::Data &data) const override { const auto *ls = static_cast<const LogSettingImpl *>(obj); data.Store("ci", ls->chan); diff --git a/modules/chanserv/cs_mode.cpp b/modules/chanserv/cs_mode.cpp index d6339311e..14d5d27c3 100644 --- a/modules/chanserv/cs_mode.cpp +++ b/modules/chanserv/cs_mode.cpp @@ -39,7 +39,7 @@ struct ModeLockTypeImpl final : Serialize::Type("ModeLock") { } - void Serialize(const Serializable *obj, Serialize::Data &data) const override; + void Serialize(Serializable *obj, Serialize::Data &data) const override; Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override; }; @@ -211,7 +211,7 @@ struct ModeLocksImpl final } }; -void ModeLockTypeImpl::Serialize(const Serializable *obj, Serialize::Data &data) const +void ModeLockTypeImpl::Serialize(Serializable *obj, Serialize::Data &data) const { const auto *ml = static_cast<const ModeLockImpl *>(obj); data.Store("ci", ml->ci); diff --git a/modules/chanserv/cs_seen.cpp b/modules/chanserv/cs_seen.cpp index ec90206e1..53b0b5865 100644 --- a/modules/chanserv/cs_seen.cpp +++ b/modules/chanserv/cs_seen.cpp @@ -53,7 +53,7 @@ struct SeenInfoType final { } - void Serialize(const Serializable *obj, Serialize::Data &data) const override + void Serialize(Serializable *obj, Serialize::Data &data) const override { const auto *s = static_cast<const SeenInfo *>(obj); data.Store("nick", s->nick); diff --git a/modules/chanserv/cs_set_misc.cpp b/modules/chanserv/cs_set_misc.cpp index 8d6effafe..68c4e6b80 100644 --- a/modules/chanserv/cs_set_misc.cpp +++ b/modules/chanserv/cs_set_misc.cpp @@ -54,7 +54,7 @@ struct CSMiscDataType { } - void Serialize(const Serializable *obj, Serialize::Data &sdata) const override + void Serialize(Serializable *obj, Serialize::Data &sdata) const override { const auto *d = static_cast<const CSMiscData *>(obj); sdata.Store("ci", d->object); diff --git a/modules/chanserv/cs_suspend.cpp b/modules/chanserv/cs_suspend.cpp index 9df5cea0b..4ddf431ff 100644 --- a/modules/chanserv/cs_suspend.cpp +++ b/modules/chanserv/cs_suspend.cpp @@ -27,7 +27,7 @@ struct CSSuspendInfoType final { } - void Serialize(const Serializable *obj, Serialize::Data &data) const override + void Serialize(Serializable *obj, Serialize::Data &data) const override { const auto *si = static_cast<const CSSuspendInfo *>(obj); data.Store("chan", si->what); |
