diff --git a/CInterface/Library/BaseLibrary.cpp b/CInterface/Library/BaseLibrary.cpp index 738a0dc..678fd9b 100644 --- a/CInterface/Library/BaseLibrary.cpp +++ b/CInterface/Library/BaseLibrary.cpp @@ -18,7 +18,7 @@ export bool simpleName##_TryGet(fullname* p, const char* name, const returnType*& out) { \ ArbUt::BorrowedPtr o; \ auto v = p->TryGet(ArbUt::StringView::CalculateHash(name)); \ - if (v.has_value()) { \ + if (!v.has_value()) { \ out = nullptr; \ return false; \ } else { \ @@ -30,7 +30,7 @@ export bool simpleName##_TryGetWithHash(fullname* p, uint32_t hashedKey, const returnType*& out) { \ ArbUt::BorrowedPtr o; \ auto v = p->TryGet(hashedKey); \ - if (v.has_value()) { \ + if (!v.has_value()) { \ out = nullptr; \ return false; \ } else { \