[keel,studio] Cleanup string handling
This commit is contained in:
@@ -233,7 +233,7 @@ class AssetManager {
|
||||
template<typename T>
|
||||
AssetTypeManager<T> *getTypeManager() noexcept {
|
||||
constexpr auto typeName = ox::requireModelTypeName<T>();
|
||||
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<AssetTypeManager<T>>();
|
||||
|
@@ -24,10 +24,10 @@ ox::Result<char*> loadRom(ox::CRStringView path) noexcept {
|
||||
auto buff = new char[static_cast<std::size_t>(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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user