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

This commit is contained in:
2020-05-26 14:13:30 +02:00
parent d82792e27a
commit 36208da2fb
11 changed files with 63 additions and 63 deletions

View File

@@ -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; \