[keel,nostalgia,studio,turbine] Fixes for ox::String explicit change

This commit is contained in:
2023-11-28 23:32:29 -06:00
parent 3a62650d62
commit da98aa864c
10 changed files with 28 additions and 44 deletions

View File

@@ -29,10 +29,10 @@ class StudioModule: public studio::Module {
};
}
ox::Vector<ox::UniquePtr<studio::ItemMaker>> itemMakers(turbine::Context*) const noexcept final {
ox::Vector<ox::UPtr<studio::ItemMaker>> itemMakers(turbine::Context*) const noexcept final {
ox::Vector<ox::UniquePtr<studio::ItemMaker>> out;
out.emplace_back(ox::make<studio::ItemMakerT<core::TileSheet>>("Tile Sheet", "TileSheets", "ng"));
out.emplace_back(ox::make<studio::ItemMakerT<core::Palette>>("Palette", "Palettes", "npal"));
out.emplace_back(ox::make<studio::ItemMakerT<core::TileSheet>>("Tile Sheet", "TileSheets", FileExt_ng));
out.emplace_back(ox::make<studio::ItemMakerT<core::Palette>>("Palette", "Palettes", FileExt_npal));
return out;
}
};

View File

@@ -632,7 +632,7 @@ ox::StringView TileSheetEditorModel::palPath() const noexcept {
}
constexpr ox::StringView uuidPrefix = "uuid://";
if (ox::beginsWith(path, uuidPrefix)) {
auto uuid = ox::StringView(path + uuidPrefix.bytes(), ox_strlen(path) - uuidPrefix.bytes());
auto uuid = ox::StringView(path.data() + uuidPrefix.bytes(), path.bytes() - uuidPrefix.bytes());
auto out = m_ctx->keelCtx.uuidToPath.at(uuid);
if (out.error) {
return {};

View File

@@ -35,17 +35,7 @@ int main(int argc, const char **argv) {
#endif
OX_INIT_DEBUG_LOGGER(loggerConn, "Nostalgia Player")
ox::Error err;
#ifdef __cpp_exceptions
try {
err = run(argc, argv);
} catch (ox::Exception const&ex) {
err = ex.toError();
} catch (...) {
err = OxError(1, "Non-Ox exception");
}
#else
err = run(argc, argv);
#endif
oxAssert(err, "Something went wrong...");
return static_cast<int>(err);
}