summaryrefslogtreecommitdiff
path: root/include/serialize.h
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-03-26 10:22:42 +0000
committerSadie Powell <sadie@witchery.services>2025-03-26 10:22:42 +0000
commitdc09408f1a68356ee21969cb4f4fb28e94bf6512 (patch)
treed0fba596df118c6c37088806eb27772b2a6e03f7 /include/serialize.h
parent49d86527efd5265d835ed5b57e97d5b2a40c6b32 (diff)
Add a typedef for the serializable id.
Diffstat (limited to 'include/serialize.h')
-rw-r--r--include/serialize.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/serialize.h b/include/serialize.h
index 440c8030c..e6ca7877a 100644
--- a/include/serialize.h
+++ b/include/serialize.h
@@ -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();