Handle cases when std::optional does not contain a value
This commit is contained in:
@@ -948,6 +948,7 @@ Surface FindMatch(const SurfaceCache& surface_cache, const SurfaceParams& params
|
||||
return std::make_pair(surface->CanSubRect(params), surface->GetInterval());
|
||||
});
|
||||
IsMatch_Helper(std::integral_constant<MatchFlags, MatchFlags::Copy>{}, [&] {
|
||||
ASSERT(validate_interval);
|
||||
auto copy_interval =
|
||||
params.FromInterval(*validate_interval).GetCopyableInterval(surface);
|
||||
bool matched = boost::icl::length(copy_interval & *validate_interval) != 0 &&
|
||||
|
@@ -600,6 +600,7 @@ void JitShader::Compile_BREAKC(Instruction instr) {
|
||||
Compile_Assert(looping, "BREAKC must be inside a LOOP");
|
||||
if (looping) {
|
||||
Compile_EvaluateCondition(instr);
|
||||
ASSERT(loop_break_label);
|
||||
jnz(*loop_break_label);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user