Remove shared_ptr, instead use borrowed_ptr to more accurately depict ownership of the objects in the BaseLibraries.
continuous-integration/drone/push Build is passing

This commit is contained in:
Deukhoofd committed 2020-05-26 14:13:30 +02:00
1 parent d82792e27a
commit 36208da2fb
11 files changed
+63 -63

No files matched your search

+2 -2
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; \