[keel] Minor optimization
This commit is contained in:
parent
227f3cd9f5
commit
60d1996f0a
@ -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 {
|
ox::Result<ox::String> uuidToPath(Context &ctx, ox::CRStringView uuid) noexcept {
|
||||||
#ifndef OX_BARE_METAL
|
#ifndef OX_BARE_METAL
|
||||||
oxRequire(out, ctx.uuidToPath.at(uuid));
|
oxRequireM(out, ctx.uuidToPath.at(uuid));
|
||||||
return *out;
|
return std::move(*out);
|
||||||
#else
|
#else
|
||||||
return OxError(1, "UUID to path conversion not supported on this platform");
|
return OxError(1, "UUID to path conversion not supported on this platform");
|
||||||
#endif
|
#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 {
|
ox::Result<ox::String> uuidToPath(Context &ctx, ox::UUID const&uuid) noexcept {
|
||||||
#ifndef OX_BARE_METAL
|
#ifndef OX_BARE_METAL
|
||||||
oxRequire(out, ctx.uuidToPath.at(uuid.toString()));
|
oxRequireM(out, ctx.uuidToPath.at(uuid.toString()));
|
||||||
return *out;
|
return std::move(*out);
|
||||||
#else
|
#else
|
||||||
return OxError(1, "UUID to path conversion not supported on this platform");
|
return OxError(1, "UUID to path conversion not supported on this platform");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user