Add default case for unhandled target_type values
This commit is contained in:
@@ -206,6 +206,9 @@ void Value::Convert(TypeName target_type, RoundMode round_mode) {
|
||||
type = target_type;
|
||||
constant.f64 = constant.f32;
|
||||
return;
|
||||
default:
|
||||
assert_unhandled_case(target_type);
|
||||
return;
|
||||
}
|
||||
case FLOAT64_TYPE:
|
||||
switch (target_type) {
|
||||
@@ -213,6 +216,9 @@ void Value::Convert(TypeName target_type, RoundMode round_mode) {
|
||||
type = target_type;
|
||||
constant.f32 = (float)constant.f64;
|
||||
return;
|
||||
default:
|
||||
assert_unhandled_case(target_type);
|
||||
return;
|
||||
}
|
||||
default:
|
||||
assert_unhandled_case(type);
|
||||
|
||||
Reference in New Issue
Block a user