1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 02:13:12 +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 -2
View File
@@ -110,10 +110,11 @@ protected:
Serializable &operator=(const Serializable &);
public:
using Id = uint64_t;
virtual ~Serializable();
/* Unique ID (per type, not globally) for this object */
uint64_t id = 0;
Id id = 0;
/* Only used by redis, to ignore updates */
unsigned short redis_ignore = 0;
@@ -175,7 +176,7 @@ protected:
public:
/* Map of Serializable objects of this type keyed by their object id. */
std::map<uint64_t, Serializable *> objects;
std::map<Serializable::Id, Serializable *> objects;
/** Destroys a serializable type. */
~Type();