summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/os_oper.h4
-rw-r--r--include/modules/os_session.h12
-rw-r--r--include/modules/sql.h12
3 files changed, 14 insertions, 14 deletions
diff --git a/include/modules/os_oper.h b/include/modules/os_oper.h
index 8a92efe45..034c2b2fd 100644
--- a/include/modules/os_oper.h
+++ b/include/modules/os_oper.h
@@ -16,8 +16,8 @@ struct MyOper final
void Serialize(Serialize::Data &data) const override
{
- data["name"] << this->name;
- data["type"] << this->ot->GetName();
+ data.Store("name", this->name);
+ data.Store("type", this->ot->GetName());
}
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data)
diff --git a/include/modules/os_session.h b/include/modules/os_session.h
index 4281ed086..0c1da71e6 100644
--- a/include/modules/os_session.h
+++ b/include/modules/os_session.h
@@ -62,12 +62,12 @@ static ServiceReference<SessionService> session_service("SessionService", "sessi
void Exception::Serialize(Serialize::Data &data) const
{
- data["mask"] << this->mask;
- data["limit"] << this->limit;
- data["who"] << this->who;
- data["reason"] << this->reason;
- data["time"] << this->time;
- data["expires"] << this->expires;
+ data.Store("mask", this->mask);
+ data.Store("limit", this->limit);
+ data.Store("who", this->who);
+ data.Store("reason", this->reason);
+ data.Store("time", this->time);
+ data.Store("expires", this->expires);
}
Serializable *Exception::Unserialize(Serializable *obj, Serialize::Data &data)
diff --git a/include/modules/sql.h b/include/modules/sql.h
index 8818a5130..8ff5efc7c 100644
--- a/include/modules/sql.h
+++ b/include/modules/sql.h
@@ -19,7 +19,7 @@ namespace SQL
public:
typedef std::map<Anope::string, std::stringstream *> Map;
Map data;
- std::map<Anope::string, Type> types;
+ std::map<Anope::string, Serialize::DataType> types;
~Data()
{
@@ -60,17 +60,17 @@ namespace SQL
this->data.clear();
}
- void SetType(const Anope::string &key, Type t) override
+ void SetType(const Anope::string &key, Serialize::DataType dt) override
{
- this->types[key] = t;
+ this->types[key] = dt;
}
- Type GetType(const Anope::string &key) const override
+ Serialize::DataType GetType(const Anope::string &key) const override
{
- std::map<Anope::string, Type>::const_iterator it = this->types.find(key);
+ auto it = this->types.find(key);
if (it != this->types.end())
return it->second;
- return DT_TEXT;
+ return Serialize::DataType::TEXT;
}
};