Remove shared_ptr, instead use borrowed_ptr to more accurately depict ownership of the objects in the BaseLibraries.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -16,14 +16,14 @@
|
||||
export uint8_t simpleName##_DeleteWithHash(fullname* p, uint32_t hashedKey) { Try(p->Delete(hashedKey);) } \
|
||||
\
|
||||
export bool simpleName##_TryGet(fullname* p, const char* name, const returnType*& out) { \
|
||||
std::shared_ptr<const returnType> o; \
|
||||
borrowed_ptr<const returnType> o; \
|
||||
auto v = p->TryGet(Arbutils::CaseInsensitiveConstString::GetHash(name), o); \
|
||||
out = o.operator->(); \
|
||||
return v; \
|
||||
} \
|
||||
\
|
||||
export bool simpleName##_TryGetWithHash(fullname* p, uint32_t hashedKey, const returnType*& out) { \
|
||||
std::shared_ptr<const returnType> o; \
|
||||
borrowed_ptr<const returnType> o; \
|
||||
auto v = p->TryGet(hashedKey, o); \
|
||||
out = o.operator->(); \
|
||||
return v; \
|
||||
|
||||
Reference in New Issue
Block a user