diff --git a/src/keel/assetmanager.hpp b/src/keel/assetmanager.hpp index 0054041d..6c823901 100644 --- a/src/keel/assetmanager.hpp +++ b/src/keel/assetmanager.hpp @@ -233,7 +233,7 @@ class AssetManager { template AssetTypeManager *getTypeManager() noexcept { constexpr auto typeName = ox::requireModelTypeName(); - static_assert(ox_strcmp(typeName, "") != 0, "Types must have TypeName to use AssetManager"); + static_assert(ox::StringView(typeName) != "", "Types must have TypeName to use AssetManager"); auto &am = m_assetTypeManagers[typeName]; if (!am) { am = ox::make_unique>(); diff --git a/src/keel/media.cpp b/src/keel/media.cpp index 4af8cb0d..d61255f2 100644 --- a/src/keel/media.cpp +++ b/src/keel/media.cpp @@ -24,10 +24,10 @@ ox::Result loadRom(ox::CRStringView path) noexcept { auto buff = new char[static_cast(size)]; file.read(buff, size); return buff; - } catch (const std::ios_base::failure &e) { + } catch (std::ios_base::failure const&e) { oxErrorf("Could not read ROM file due to file IO failure: {}", e.what()); return OxError(2, "Could not read ROM file"); - } catch (const std::bad_alloc &e) { + } catch (std::bad_alloc const&e) { oxErrorf("Could not read ROM file due to new failure: {}", e.what()); return OxError(2, "Could not allocate memory for ROM file"); } diff --git a/src/studio/modlib/include/studio/configio.hpp b/src/studio/modlib/include/studio/configio.hpp index 725fd0ad..d15aea0a 100644 --- a/src/studio/modlib/include/studio/configio.hpp +++ b/src/studio/modlib/include/studio/configio.hpp @@ -64,7 +64,7 @@ ox::Error writeConfig(keel::Context *ctx, T *data) noexcept { } template -void openConfig(keel::Context *ctx, const auto &name, Func f) noexcept { +void openConfig(keel::Context *ctx, ox::CRStringView name, Func f) noexcept { oxAssert(name != "", "Config type has no TypeName"); const auto [c, err] = readConfig(ctx, name); oxLogError(err); @@ -78,8 +78,8 @@ void openConfig(keel::Context *ctx, Func f) noexcept { } template -void editConfig(keel::Context *ctx, const auto &name, Func f) noexcept { - oxAssert(ox_strcmp(name, ""), "Config type has no TypeName"); +void editConfig(keel::Context *ctx, ox::CRStringView name, Func f) noexcept { + oxAssert(name != "", "Config type has no TypeName"); auto [c, err] = readConfig(ctx, name); oxLogError(err); f(&c);