1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibGfx/PortableFormat: Use static_cast instead of C-style casts

This commit is contained in:
Lucas CHOLLET 2023-03-16 20:28:40 -04:00 committed by Andreas Kling
parent fd04b2dc9b
commit fcaa535dec
2 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,7 @@ ErrorOr<void> read_image_data(PGMLoadingContext& context)
TRY(read_whitespace(context));
color_data[i] = { (u8)value, (u8)value, (u8)value };
color_data[i] = { static_cast<u8>(value), static_cast<u8>(value), static_cast<u8>(value) };
}
} else if (context.type == PGMLoadingContext::Type::RAWBITS) {
for (u64 i = 0; i < context_size; ++i) {