refactor: rename thing_type to type

Rename thing_type to type and use shared pointer instead of value in
thing.
This commit is contained in:
2026-07-01 16:25:46 +02:00
parent 42f020977e
commit 482ab859ed
2 changed files with 39 additions and 36 deletions
+5 -14
View File
@@ -141,27 +141,18 @@ using mod_h = handle<mod, refcount_header<mod_id>>;
// thing.hpp
/**
* @enum thing_type_t
* @enum type_t
* @brief Type of the thing's type.
*/
enum class thing_type_t : std::uint32_t;
enum class type_t : std::uint32_t;
/**
* @struct thing_type
* @struct type
* @brief Thing type.
*/
struct thing_type;
struct type;
/**
* @brief Thing type's identifier.
*/
using thing_type_id = std::uint32_t;
// TODO: Use generic header
/**
* @brief A handle to a thing type.
*/
using thing_type_h = handle<thing_type, refcount_header<thing_type_id>>;
using type_p = std::shared_ptr<type>;
/**
* @class bad_thing_access