[jasper] Cleanup OxError
All checks were successful
Build / build (push) Successful in 3m42s

This commit is contained in:
Gary Talent 2024-12-13 22:08:56 -06:00
parent f1e9b94df6
commit 1b5d81b644
3 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ constexpr ox::Result<ox::String> objectSetPath(WorldDoc const&wd, uint64_t setId
auto const obj = ox::find_if(wd.objSets.begin(), wd.objSets.end(), [setId](ObjectSetEntry const&e) {
return e.id == setId;
});
oxReturnError(OxError(obj == wd.objSets.end(), "Obj set not found"));
oxReturnError(ox::Error(obj == wd.objSets.end(), "Obj set not found"));
return obj->path;
}
@ -101,7 +101,7 @@ constexpr ox::Result<uint64_t> objectSetId(WorldDoc const&wd, ox::StringView set
auto const obj = ox::find_if(wd.objSets.begin(), wd.objSets.end(), [setPath](ObjectSetEntry const&e) {
return e.path == setPath;
});
oxReturnError(OxError(obj == wd.objSets.end(), "Obj set not found"));
oxReturnError(ox::Error(obj == wd.objSets.end(), "Obj set not found"));
return obj->id;
}

View File

@ -70,7 +70,7 @@ void MapTileHighlighter::draw() noexcept {
ox::Error MapTileHighlighter::setTileHighlight(ox::Point const&addr, bool const hl) noexcept {
if (addr.x >= m_subsheetTilesWidth || addr.y >= m_subsheetTilesHeight) {
return OxError(1, "tile addr out of bounds");
return ox::Error(1, "tile addr out of bounds");
}
auto const vboLength = static_cast<size_t>(s_programSrc.rowLen) * 4;
auto constexpr eboLength = 6;

View File

@ -16,7 +16,7 @@ World::World(ncore::Context &nctx, WorldStatic const&worldStatic) noexcept:
ox::Error World::setupDisplay() noexcept {
if (m_worldStatic.palettes.empty()) {
return OxError(1, "World has no palettes");
return ox::Error(1, "World has no palettes");
}
for (auto i = 0u; auto const&palAddr : m_worldStatic.palettes) {
oxRequire(pal, readObj<ncore::CompactPalette>(keelCtx(m_nctx), palAddr));