diff options
author | Sadie Powell <sadie@witchery.services> | 2025-03-26 10:22:42 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-03-26 10:22:42 +0000 |
commit | dc09408f1a68356ee21969cb4f4fb28e94bf6512 (patch) | |
tree | d0fba596df118c6c37088806eb27772b2a6e03f7 /modules/database/db_sql_live.cpp | |
parent | 49d86527efd5265d835ed5b57e97d5b2a40c6b32 (diff) |
Add a typedef for the serializable id.
Diffstat (limited to 'modules/database/db_sql_live.cpp')
-rw-r--r-- | modules/database/db_sql_live.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp index 9389e5a59..c20a11a9f 100644 --- a/modules/database/db_sql_live.cpp +++ b/modules/database/db_sql_live.cpp @@ -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; |