1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 14:45:44 +02:00

Add a typedef for the serializable id.

This commit is contained in:
Sadie Powell
2025-03-26 10:22:42 +00:00
parent 49d86527ef
commit dc09408f1a
6 changed files with 11 additions and 10 deletions
+3 -3
View File
@@ -190,7 +190,7 @@ public:
auto oid = Anope::TryConvert<unsigned int>(res.Get(i, "id"));
auto oid = Anope::TryConvert<Serializable::Id>(res.Get(i, "id"));
if (!oid.has_value())
{
Log(LOG_DEBUG) << "Unable to convert id from " << obj->GetName();
@@ -201,7 +201,7 @@ public:
if (res.Get(i, "timestamp").empty())
{
clear_null = true;
std::map<uint64_t, Serializable *>::iterator it = obj->objects.find(id);
auto it = obj->objects.find(id);
if (it != obj->objects.end())
delete it->second; // This also removes this object from the map
}
@@ -213,7 +213,7 @@ public:
data[key] << value;
Serializable *s = NULL;
std::map<uint64_t, Serializable *>::iterator it = obj->objects.find(id);
auto it = obj->objects.find(id);
if (it != obj->objects.end())
s = it->second;