[keel] Minor optimization

This commit is contained in:
Gary Talent 2024-05-03 23:00:38 -05:00
parent 227f3cd9f5
commit 60d1996f0a

View File

@ -85,8 +85,8 @@ ox::Result<ox::UUID> pathToUuid(Context &ctx, ox::CRStringView path) noexcept {
ox::Result<ox::String> uuidToPath(Context &ctx, ox::CRStringView uuid) noexcept {
#ifndef OX_BARE_METAL
oxRequire(out, ctx.uuidToPath.at(uuid));
return *out;
oxRequireM(out, ctx.uuidToPath.at(uuid));
return std::move(*out);
#else
return OxError(1, "UUID to path conversion not supported on this platform");
#endif
@ -94,8 +94,8 @@ ox::Result<ox::String> uuidToPath(Context &ctx, ox::CRStringView uuid) noexcept
ox::Result<ox::String> uuidToPath(Context &ctx, ox::UUID const&uuid) noexcept {
#ifndef OX_BARE_METAL
oxRequire(out, ctx.uuidToPath.at(uuid.toString()));
return *out;
oxRequireM(out, ctx.uuidToPath.at(uuid.toString()));
return std::move(*out);
#else
return OxError(1, "UUID to path conversion not supported on this platform");
#endif