Kernel: replace boost::intrusive_ptr with std::shared_ptr
This commit is contained in:
@ -50,7 +50,7 @@ public:
|
||||
* @return The created Handle or one of the following errors:
|
||||
* - `ERR_OUT_OF_HANDLES`: the maximum number of handles has been exceeded.
|
||||
*/
|
||||
ResultVal<Handle> Create(SharedPtr<Object> obj);
|
||||
ResultVal<Handle> Create(std::shared_ptr<Object> obj);
|
||||
|
||||
/**
|
||||
* Returns a new handle that points to the same object as the passed in handle.
|
||||
@ -74,7 +74,7 @@ public:
|
||||
* Looks up a handle.
|
||||
* @return Pointer to the looked-up object, or `nullptr` if the handle is not valid.
|
||||
*/
|
||||
SharedPtr<Object> GetGeneric(Handle handle) const;
|
||||
std::shared_ptr<Object> GetGeneric(Handle handle) const;
|
||||
|
||||
/**
|
||||
* Looks up a handle while verifying its type.
|
||||
@ -82,7 +82,7 @@ public:
|
||||
* type differs from the requested one.
|
||||
*/
|
||||
template <class T>
|
||||
SharedPtr<T> Get(Handle handle) const {
|
||||
std::shared_ptr<T> Get(Handle handle) const {
|
||||
return DynamicObjectCast<T>(GetGeneric(handle));
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ private:
|
||||
static const std::size_t MAX_COUNT = 4096;
|
||||
|
||||
/// Stores the Object referenced by the handle or null if the slot is empty.
|
||||
std::array<SharedPtr<Object>, MAX_COUNT> objects;
|
||||
std::array<std::shared_ptr<Object>, MAX_COUNT> objects;
|
||||
|
||||
/**
|
||||
* The value of `next_generation` when the handle was created, used to check for validity. For
|
||||
|
Reference in New Issue
Block a user