mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
Libraries: Fix -Wunreachable-code warnings from clang
This commit is contained in:
parent
96666f3209
commit
b8dc3661ac
Notes:
sideshowbarker
2024-07-18 02:54:35 +09:00
Author: https://github.com/nico
Commit: b8dc3661ac
Pull-request: https://github.com/SerenityOS/serenity/pull/10399
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