mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 19:04:56 +00:00
Implicit switch fallthrough refactor
This commit is contained in:
2
hecl/extern/boo
vendored
2
hecl/extern/boo
vendored
Submodule hecl/extern/boo updated: 45db327fb3...1c21519d5d
@@ -325,6 +325,7 @@ GX::TraceResult GX::RecursiveTraceColor(const IR& ir, Diagnostics& diag, const I
|
||||
}
|
||||
|
||||
diag.reportBackendErr(inst.m_loc, "unable to convert arithmetic to TEV stage");
|
||||
break;
|
||||
}
|
||||
case IR::OpType::Swizzle: {
|
||||
if (inst.m_swizzle.m_idxs[0] == 3 && inst.m_swizzle.m_idxs[1] == 3 && inst.m_swizzle.m_idxs[2] == 3 &&
|
||||
@@ -335,6 +336,7 @@ GX::TraceResult GX::RecursiveTraceColor(const IR& ir, Diagnostics& diag, const I
|
||||
return RecursiveTraceColor(ir, diag, cInst, true);
|
||||
} else
|
||||
diag.reportBackendErr(inst.m_loc, "only alpha extract may be performed with swizzle operation");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
diag.reportBackendErr(inst.m_loc, "invalid color op");
|
||||
@@ -573,6 +575,7 @@ GX::TraceResult GX::RecursiveTraceAlpha(const IR& ir, Diagnostics& diag, const I
|
||||
}
|
||||
|
||||
diag.reportBackendErr(inst.m_loc, "unable to convert arithmetic to TEV stage");
|
||||
break;
|
||||
}
|
||||
case IR::OpType::Swizzle: {
|
||||
if (inst.m_swizzle.m_idxs[0] == 3 && inst.m_swizzle.m_idxs[1] == 3 && inst.m_swizzle.m_idxs[2] == 3 &&
|
||||
@@ -583,6 +586,7 @@ GX::TraceResult GX::RecursiveTraceAlpha(const IR& ir, Diagnostics& diag, const I
|
||||
return RecursiveTraceAlpha(ir, diag, cInst);
|
||||
} else
|
||||
diag.reportBackendErr(inst.m_loc, "only alpha extract may be performed with swizzle operation");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
diag.reportBackendErr(inst.m_loc, "invalid alpha op");
|
||||
|
||||
@@ -160,6 +160,7 @@ std::string ProgrammableCommon::RecursiveTraceColor(const IR& ir, Diagnostics& d
|
||||
default:
|
||||
diag.reportBackendErr(inst.m_loc, "invalid arithmetic op");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IR::OpType::Swizzle: {
|
||||
const IR::Instruction& aInst = inst.getChildInst(ir, 0);
|
||||
@@ -179,7 +180,7 @@ std::string ProgrammableCommon::RecursiveTraceAlpha(const IR& ir, Diagnostics& d
|
||||
case IR::OpType::Call: {
|
||||
const std::string& name = inst.m_call.m_name;
|
||||
bool normalize = false;
|
||||
if (!name.compare("Texture") || (normalize = true && !name.compare("TextureN"))) {
|
||||
if (!name.compare("Texture") || ((normalize = true) && !name.compare("TextureN"))) {
|
||||
if (inst.getChildCount() < 2)
|
||||
diag.reportBackendErr(inst.m_loc, "Texture(map, texgen) requires 2 arguments");
|
||||
|
||||
@@ -230,6 +231,7 @@ std::string ProgrammableCommon::RecursiveTraceAlpha(const IR& ir, Diagnostics& d
|
||||
default:
|
||||
diag.reportBackendErr(inst.m_loc, "invalid arithmetic op");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IR::OpType::Swizzle: {
|
||||
const IR::Instruction& aInst = inst.getChildInst(ir, 0);
|
||||
|
||||
@@ -423,6 +423,7 @@ hecl::DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
if (mode == Mode::DirsSorted)
|
||||
break;
|
||||
rewinddir(dir);
|
||||
[[fallthrough]];
|
||||
}
|
||||
case Mode::FilesSorted: {
|
||||
if (mode == Mode::FilesSorted)
|
||||
|
||||
Reference in New Issue
Block a user