Compare commits

...

3 Commits

Author SHA1 Message Date
d259770f32 Merge commit '4ea4a61d542777a270c4e2c283e0e986fc9eec9c'
All checks were successful
Build / build (push) Successful in 3m9s
2025-01-11 12:32:00 -06:00
80bad608f7 [keel] Fix reloadAsset 2025-01-11 03:39:38 -06:00
2bce9a2baf [ox/std] Add non-const SmallMap::pairs 2025-01-11 03:37:27 -06:00
2 changed files with 7 additions and 3 deletions

View File

@ -85,6 +85,11 @@ class SmallMap {
return m_pairs;
}
[[nodiscard]]
constexpr ox::Span<Pair> pairs() noexcept {
return m_pairs;
}
constexpr void clear();
private:

View File

@ -154,13 +154,12 @@ ox::Result<ox::CStringView> uuidToPath(Context &ctx, ox::UUID const&uuid) noexce
}
ox::Error reloadAsset(keel::Context &ctx, ox::StringViewCR assetId) noexcept {
ox::UUIDStr uuidStr;
if (beginsWith(assetId, "uuid://")) {
return ctx.assetManager.reloadAsset(substr(assetId, 7));
} else {
auto const [uuid, uuidErr] = getUuid(ctx, assetId);
auto const [uuid, uuidErr] = getUuid(ctx, assetId);
if (!uuidErr) {
return ctx.assetManager.reloadAsset(uuidStr);
return ctx.assetManager.reloadAsset(uuid.toString());
} else {
return ctx.assetManager.reloadAsset(assetId);
}