LibGfx: Use VERIFY_NOT_REACHED() for impossible states in ICC code
The `parse_` functions reject invalid values, so we know the default is unreachable.
This commit is contained in:
parent
a8ee5dd9cd
commit
b1e977e18a
Notes:
sideshowbarker
2024-07-17 02:22:11 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/b1e977e18a Pull-request: https://github.com/SerenityOS/serenity/pull/16745
1 changed files with 3 additions and 6 deletions
|
@ -208,9 +208,8 @@ StringView device_class_name(DeviceClass device_class)
|
|||
return "Abstract"sv;
|
||||
case DeviceClass::NamedColor:
|
||||
return "NamedColor"sv;
|
||||
default:
|
||||
return "(unknown device class)"sv;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
StringView color_space_name(ColorSpace color_space)
|
||||
|
@ -266,9 +265,8 @@ StringView color_space_name(ColorSpace color_space)
|
|||
return "14 color"sv;
|
||||
case ColorSpace::FifteenColor:
|
||||
return "15 color"sv;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
StringView rendering_intent_name(RenderingIntent rendering_intent)
|
||||
|
@ -282,9 +280,8 @@ StringView rendering_intent_name(RenderingIntent rendering_intent)
|
|||
return "Saturation"sv;
|
||||
case RenderingIntent::ICCAbsoluteColorimetric:
|
||||
return "ICC-absolute colorimetric"sv;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<Profile>> Profile::try_load_from_externally_owned_memory(ReadonlyBytes bytes)
|
||||
|
|
Loading…
Add table
Reference in a new issue