mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
Libraries: Fix -Wunreachable-code warnings from clang
This commit is contained in:
parent
96666f3209
commit
b8dc3661ac
10 changed files with 7 additions and 27 deletions
|
@ -784,7 +784,8 @@ static bool decode_dds(DDSLoadingContext& context)
|
|||
return false;
|
||||
}
|
||||
|
||||
for (size_t mipmap_level = 0; mipmap_level < max(context.header.mip_map_count, 1u); mipmap_level++) {
|
||||
// We support parsing mipmaps, but we only care about the largest one :^) (At least for now)
|
||||
if (size_t mipmap_level = 0; mipmap_level < max(context.header.mip_map_count, 1u)) {
|
||||
u64 width = get_width(context.header, mipmap_level);
|
||||
u64 height = get_height(context.header, mipmap_level);
|
||||
|
||||
|
@ -795,9 +796,6 @@ static bool decode_dds(DDSLoadingContext& context)
|
|||
context.bitmap = Bitmap::try_create(BitmapFormat::BGRA8888, { width, height });
|
||||
|
||||
decode_bitmap(stream, context, format, width, height);
|
||||
|
||||
// We support parsing mipmaps, but we only care about the largest one :^) (At least for now)
|
||||
break;
|
||||
}
|
||||
|
||||
context.state = DDSLoadingContext::State::BitmapDecoded;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue