mirror of
https://github.com/anope/anope.git
synced 2026-06-25 09:36:39 +02:00
Move serialization from Serializable to a Serialize::Type child.
This commit is contained in:
@@ -93,18 +93,18 @@ public:
|
||||
{
|
||||
if (obj && this->SQL)
|
||||
{
|
||||
Serialize::Type *s_type = obj->GetSerializableType();
|
||||
if (!s_type)
|
||||
continue;
|
||||
|
||||
Data data;
|
||||
obj->Serialize(data);
|
||||
s_type->Serialize(obj, data);
|
||||
|
||||
if (obj->IsCached(data))
|
||||
continue;
|
||||
|
||||
obj->UpdateCache(data);
|
||||
|
||||
Serialize::Type *s_type = obj->GetSerializableType();
|
||||
if (!s_type)
|
||||
continue;
|
||||
|
||||
auto create = this->SQL->CreateTable(GetTableName(s_type), data);
|
||||
for (const auto &query : create)
|
||||
this->RunQuery(query);
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
*/
|
||||
|
||||
Data data2;
|
||||
new_s->Serialize(data2);
|
||||
obj->Serialize(new_s, data2);
|
||||
new_s->UpdateCache(data2); /* We know this is the most up to date copy */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user