1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 05:23:13 +02:00

Optimize much of the database code and serialize code.

This commit is contained in:
Adam
2012-12-13 06:12:56 -05:00
parent 76ba147c22
commit c1077faa28
60 changed files with 1203 additions and 1057 deletions
+6 -6
View File
@@ -22,19 +22,19 @@ struct ChanSuspend : ExtensibleItem, Serializable
{
}
Serialize::Data Serialize() const anope_override
void Serialize(Serialize::Data &sd) const anope_override
{
Serialize::Data sd;
sd["chan"] << this->chan;
sd["when"] << this->when;
return sd;
}
static Serializable* Unserialize(Serializable *obj, Serialize::Data &sd)
{
ChannelInfo *ci = ChannelInfo::Find(sd["chan"].astr());
Anope::string schan;
sd["chan"] >> schan;
ChannelInfo *ci = ChannelInfo::Find(schan);
if (ci == NULL)
return NULL;