[nostalgia,olympic] Replace oxIgnoreError with std::ignore
This commit is contained in:
@ -117,7 +117,7 @@ class AssetRef: public ox::SignalHandler {
|
||||
}
|
||||
if (m_ctr) {
|
||||
m_ctr->decRefs();
|
||||
oxIgnoreError(m_ctr->updated.disconnectObject(this));
|
||||
std::ignore = m_ctr->updated.disconnectObject(this);
|
||||
}
|
||||
m_ctr = h.m_ctr;
|
||||
if (m_ctr) {
|
||||
@ -133,11 +133,11 @@ class AssetRef: public ox::SignalHandler {
|
||||
}
|
||||
if (m_ctr) {
|
||||
m_ctr->decRefs();
|
||||
oxIgnoreError(m_ctr->updated.disconnectObject(this));
|
||||
std::ignore = m_ctr->updated.disconnectObject(this);
|
||||
}
|
||||
m_ctr = h.m_ctr;
|
||||
if (m_ctr) {
|
||||
oxIgnoreError(m_ctr->updated.disconnectObject(&h));
|
||||
std::ignore = m_ctr->updated.disconnectObject(&h);
|
||||
m_ctr->updated.connect(this, &AssetRef::emitUpdated);
|
||||
}
|
||||
h.m_ctr = nullptr;
|
||||
|
@ -11,7 +11,7 @@ ox::Error init(
|
||||
ox::UPtr<ox::FileSystem> &&fs,
|
||||
ox::CRStringView appName) noexcept {
|
||||
ctx.appName = appName;
|
||||
oxIgnoreError(setRomFs(ctx, std::move(fs)));
|
||||
std::ignore = setRomFs(ctx, std::move(fs));
|
||||
#ifndef OX_BARE_METAL
|
||||
auto const&mods = modules();
|
||||
for (auto &mod : mods) {
|
||||
|
@ -417,10 +417,10 @@ ox::Error StudioUI::closeFile(ox::CRStringView path) noexcept {
|
||||
if (!m_openFiles.contains(path)) {
|
||||
return {};
|
||||
}
|
||||
oxIgnoreError(m_openFiles.erase(std::remove(m_openFiles.begin(), m_openFiles.end(), path)));
|
||||
std::ignore = m_openFiles.erase(std::remove(m_openFiles.begin(), m_openFiles.end(), path));
|
||||
// save to config
|
||||
studio::editConfig<StudioConfig>(keelCtx(m_ctx), [&](StudioConfig *config) {
|
||||
oxIgnoreError(config->openFiles.erase(std::remove(config->openFiles.begin(), config->openFiles.end(), path)));
|
||||
std::ignore = config->openFiles.erase(std::remove(config->openFiles.begin(), config->openFiles.end(), path));
|
||||
});
|
||||
return {};
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ static ox::Result<ox::String> toResult(nfdresult_t r, NFD::UniquePathN const&pat
|
||||
ox::String out;
|
||||
for (auto i = 0u; path.get()[i]; ++i) {
|
||||
auto const c = static_cast<char>(path.get()[i]);
|
||||
oxIgnoreError(out.append(&c, 1));
|
||||
std::ignore = out.append(&c, 1);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
@ -9,13 +9,13 @@
|
||||
namespace studio {
|
||||
|
||||
void TaskRunner::update(turbine::Context &ctx) noexcept {
|
||||
oxIgnoreError(m_tasks.erase(std::remove_if(m_tasks.begin(), m_tasks.end(), [&](ox::UPtr<studio::Task> &t) {
|
||||
std::ignore = m_tasks.erase(std::remove_if(m_tasks.begin(), m_tasks.end(), [&](ox::UPtr<studio::Task> &t) {
|
||||
auto const done = t->update(ctx) == TaskState::Done;
|
||||
if (done) {
|
||||
t->finished.emit();
|
||||
}
|
||||
return done;
|
||||
})));
|
||||
}));
|
||||
}
|
||||
|
||||
void TaskRunner::add(Task &task) noexcept {
|
||||
|
@ -12,7 +12,7 @@ bool UndoCommand::mergeWith(UndoCommand const*) noexcept {
|
||||
|
||||
void UndoStack::push(ox::UPtr<UndoCommand> &&cmd) noexcept {
|
||||
for (auto const i = m_stackIdx; i < m_stack.size();) {
|
||||
oxIgnoreError(m_stack.erase(i));
|
||||
std::ignore = m_stack.erase(i);
|
||||
}
|
||||
cmd->redo();
|
||||
redoTriggered.emit(cmd.get());
|
||||
|
@ -22,7 +22,7 @@ void addDrawer(Context &ctx, Drawer *cd) noexcept {
|
||||
void removeDrawer(Context &ctx, Drawer *cd) noexcept {
|
||||
for (auto i = 0u; i < ctx.drawers.size(); ++i) {
|
||||
if (ctx.drawers[i] == cd) {
|
||||
oxIgnoreError(ctx.drawers.erase(i));
|
||||
std::ignore = ctx.drawers.erase(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user