mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-27 12:46:06 +00:00
LibGfx: Use static_cast instead of C-style cast
This commit is contained in:
parent
2394845d58
commit
09f336bf8f
Notes:
github-actions[bot]
2025-07-20 00:32:15 +00:00
Author: https://github.com/kennethmyhra
Commit: 09f336bf8f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5445
Reviewed-by: https://github.com/shannonbooth
1 changed files with 8 additions and 7 deletions
|
@ -24,18 +24,19 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
enum class StorageFormat {
|
||||
BGRx8888,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue