diff options
author | Peter Powell <petpow@saberuk.com> | 2019-08-07 19:37:27 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-08-07 19:37:27 +0100 |
commit | 714284aa306f2912eaca0c28d779d227db62a96b (patch) | |
tree | a559faf3cfb5b986255ad8b40adf8af1a3866654 /src/modules/m_monitor.cpp | |
parent | 85182d727c0d549b9cf6659ad36dec70fcf02278 (diff) |
Convert all core ExtensionItem code away from {un,}serialize.
Diffstat (limited to 'src/modules/m_monitor.cpp')
-rw-r--r-- | src/modules/m_monitor.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/modules/m_monitor.cpp b/src/modules/m_monitor.cpp index b82dbcc7d..cebd69fc2 100644 --- a/src/modules/m_monitor.cpp +++ b/src/modules/m_monitor.cpp @@ -82,12 +82,9 @@ class IRCv3::Monitor::Manager free(container, unset_raw(container)); } - std::string serialize(SerializeFormat format, const Extensible* container, void* item) const CXX11_OVERRIDE + std::string ToInternal(const Extensible* container, void* item) const CXX11_OVERRIDE { std::string ret; - if (format == FORMAT_NETWORK) - return ret; - const ExtData* extdata = static_cast<ExtData*>(item); for (WatchedList::const_iterator i = extdata->list.begin(); i != extdata->list.end(); ++i) { @@ -99,7 +96,7 @@ class IRCv3::Monitor::Manager return ret; } - void unserialize(SerializeFormat format, Extensible* container, const std::string& value) CXX11_OVERRIDE; + void FromInternal(Extensible* container, const std::string& value) CXX11_OVERRIDE; void free(Extensible* container, void* item) CXX11_OVERRIDE { @@ -245,12 +242,8 @@ class IRCv3::Monitor::Manager WatchedList emptywatchedlist; }; -// inline is needed in static builds to support m_watch including the Manager code from this file -inline void IRCv3::Monitor::Manager::ExtItem::unserialize(SerializeFormat format, Extensible* container, const std::string& value) +void IRCv3::Monitor::Manager::ExtItem::FromInternal(Extensible* container, const std::string& value) { - if (format == FORMAT_NETWORK) - return; - irc::spacesepstream ss(value); for (std::string nick; ss.GetToken(nick); ) manager.Watch(static_cast<LocalUser*>(container), nick, UINT_MAX); |