mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibGfx: Use static_cast instead of C-style cast
This commit is contained in:
parent
2394845d58
commit
09f336bf8f
|
|
@ -24,17 +24,18 @@ enum class BitmapFormat {
|
|||
RGBA8888,
|
||||
};
|
||||
|
||||
inline bool is_valid_bitmap_format(unsigned format)
|
||||
inline bool is_valid_bitmap_format(u32 const format)
|
||||
{
|
||||
switch (format) {
|
||||
case (unsigned)BitmapFormat::Invalid:
|
||||
case (unsigned)BitmapFormat::BGRx8888:
|
||||
case (unsigned)BitmapFormat::RGBx8888:
|
||||
case (unsigned)BitmapFormat::BGRA8888:
|
||||
case (unsigned)BitmapFormat::RGBA8888:
|
||||
case static_cast<u32>(BitmapFormat::Invalid):
|
||||
case static_cast<u32>(BitmapFormat::BGRx8888):
|
||||
case static_cast<u32>(BitmapFormat::RGBx8888):
|
||||
case static_cast<u32>(BitmapFormat::BGRA8888):
|
||||
case static_cast<u32>(BitmapFormat::RGBA8888):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
enum class StorageFormat {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user