Fixes CInterface for BaseLibrary returning wrong value.
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
parent
87bbae678a
commit
65cf7c52d9
|
@ -18,7 +18,7 @@
|
||||||
export bool simpleName##_TryGet(fullname* p, const char* name, const returnType*& out) { \
|
export bool simpleName##_TryGet(fullname* p, const char* name, const returnType*& out) { \
|
||||||
ArbUt::BorrowedPtr<const returnType> o; \
|
ArbUt::BorrowedPtr<const returnType> o; \
|
||||||
auto v = p->TryGet(ArbUt::StringView::CalculateHash(name)); \
|
auto v = p->TryGet(ArbUt::StringView::CalculateHash(name)); \
|
||||||
if (v.has_value()) { \
|
if (!v.has_value()) { \
|
||||||
out = nullptr; \
|
out = nullptr; \
|
||||||
return false; \
|
return false; \
|
||||||
} else { \
|
} else { \
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
export bool simpleName##_TryGetWithHash(fullname* p, uint32_t hashedKey, const returnType*& out) { \
|
export bool simpleName##_TryGetWithHash(fullname* p, uint32_t hashedKey, const returnType*& out) { \
|
||||||
ArbUt::BorrowedPtr<const returnType> o; \
|
ArbUt::BorrowedPtr<const returnType> o; \
|
||||||
auto v = p->TryGet(hashedKey); \
|
auto v = p->TryGet(hashedKey); \
|
||||||
if (v.has_value()) { \
|
if (!v.has_value()) { \
|
||||||
out = nullptr; \
|
out = nullptr; \
|
||||||
return false; \
|
return false; \
|
||||||
} else { \
|
} else { \
|
||||||
|
|
Loading…
Reference in New Issue