[keel] Cleanup
All checks were successful
Build / build (push) Successful in 1m16s

This commit is contained in:
2026-02-07 15:29:53 -06:00
parent e29a50d0dc
commit 110d4a2e6a
3 changed files with 15 additions and 15 deletions

View File

@@ -189,8 +189,4 @@ ox::Error setRomFs(Context &ctx, ox::UPtr<ox::FileSystem> &&fs) noexcept;
ox::Result<ox::UPtr<ox::FileSystem>> loadRomFs(ox::StringViewCR path) noexcept;
ox::Result<char*> loadRom(ox::StringViewCR path = "") noexcept;
void unloadRom(char*) noexcept;
}

View File

@@ -37,9 +37,9 @@ class Module {
virtual ox::Vector<PackTransform> packTransforms() const noexcept;
};
void registerModule(Module const*mod) noexcept;
void registerModule(Module const *mod) noexcept;
[[nodiscard]]
ox::Vector<keel::Module const*> const &modules() noexcept;
ox::Vector<Module const*> const &modules() noexcept;
}

View File

@@ -19,7 +19,7 @@ class Wrap {
public:
virtual ~Wrap() = default;
[[nodiscard]]
virtual ox::CStringView typeName() const noexcept = 0;
virtual ox::StringLiteral typeName() const noexcept = 0;
[[nodiscard]]
virtual int typeVersion() const noexcept = 0;
[[nodiscard]]
@@ -48,7 +48,7 @@ class WrapRef final: public WrapT<T> {
constexpr explicit WrapRef(T &obj): m_obj{obj} {}
[[nodiscard]]
ox::CStringView typeName() const noexcept override {
ox::StringLiteral typeName() const noexcept override {
return ox::ModelTypeName_v<T>;
}
@@ -77,7 +77,7 @@ class WrapInline final: public WrapT<T> {
}
[[nodiscard]]
ox::CStringView typeName() const noexcept override {
ox::StringLiteral typeName() const noexcept override {
return ox::ModelTypeName_v<T>;
}
@@ -108,7 +108,7 @@ class BaseConverter {
constexpr virtual ~BaseConverter() noexcept = default;
[[nodiscard]]
constexpr virtual ox::StringView srcTypeName() const noexcept = 0;
constexpr virtual ox::StringLiteral srcTypeName() const noexcept = 0;
[[nodiscard]]
constexpr virtual int srcTypeVersion() const noexcept = 0;
@@ -154,7 +154,7 @@ class ConverterFunc final: public BaseConverter {
using DstType = typename decltype(extractParams(Func))::Dst;
[[nodiscard]]
constexpr ox::StringView srcTypeName() const noexcept override {
constexpr ox::StringLiteral srcTypeName() const noexcept override {
return ox::ModelTypeName_v<SrcType>;
}
@@ -253,19 +253,22 @@ template<typename DstType>
ox::Result<DstType> convertObjToObj(
Context &ctx,
auto &src) noexcept {
OX_REQUIRE_M(out, convert(ctx, WrapRef{src}, ox::ModelTypeName_v<DstType>, ox::ModelTypeVersion_v<DstType>));
OX_REQUIRE_M(out,
convert(ctx, WrapRef{src}, ox::ModelTypeName_v<DstType>, ox::ModelTypeVersion_v<DstType>));
return std::move(wrapCast(*out));
}
template<typename DstType>
ox::Result<DstType> convert(Context &ctx, ox::BufferView const &src) noexcept {
OX_REQUIRE(out, convert(ctx, src, ox::ModelTypeName_v<DstType>, ox::ModelTypeVersion_v<DstType>));
OX_REQUIRE(out,
convert(ctx, src, ox::ModelTypeName_v<DstType>, ox::ModelTypeVersion_v<DstType>));
return std::move(wrapCast<DstType>(*out));
}
template<typename DstType>
ox::Error convert(Context &ctx, ox::BufferView const &buff, DstType &outObj) noexcept {
OX_REQUIRE(out, convert(ctx, buff, ox::ModelTypeName_v<DstType>, ox::ModelTypeVersion_v<DstType>));
OX_REQUIRE(out,
convert(ctx, buff, ox::ModelTypeName_v<DstType>, ox::ModelTypeVersion_v<DstType>));
outObj = std::move(wrapCast<DstType>(*out));
return {};
}
@@ -280,7 +283,8 @@ ox::Error convertObjToObj(Context &ctx, auto &src, DstType &outObj) noexcept {
template<typename DstType>
ox::Result<ox::Buffer> convertBuffToBuff(
Context &ctx, ox::BufferView const &src, ox::ClawFormat const fmt) noexcept {
OX_REQUIRE(out, convert(ctx, src, ox::ModelTypeName_v<DstType>, ox::ModelTypeVersion_v<DstType>));
OX_REQUIRE(out,
convert(ctx, src, ox::ModelTypeName_v<DstType>, ox::ModelTypeVersion_v<DstType>));
return ox::writeClaw<DstType>(wrapCast<DstType>(*out), fmt);
}