mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGfx/ICO: Remove unused parameter
This commit is contained in:
parent
aef188207c
commit
15d151ee66
Notes:
sideshowbarker
2024-07-17 10:16:43 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/15d151ee66 Pull-request: https://github.com/SerenityOS/serenity/pull/23192
2 changed files with 4 additions and 6 deletions
|
@ -136,13 +136,11 @@ static ErrorOr<void> load_ico_directory(ICOLoadingContext& context)
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> ICOImageDecoderPlugin::load_ico_bitmap(ICOLoadingContext& context, Optional<size_t> index)
|
||||
ErrorOr<void> ICOImageDecoderPlugin::load_ico_bitmap(ICOLoadingContext& context)
|
||||
{
|
||||
VERIFY(context.state >= ICOLoadingContext::State::DirectoryDecoded);
|
||||
|
||||
size_t real_index = context.largest_index;
|
||||
if (index.has_value())
|
||||
real_index = index.value();
|
||||
size_t const real_index = context.largest_index;
|
||||
if (real_index >= context.images.size())
|
||||
return Error::from_string_literal("Index out of bounds");
|
||||
|
||||
|
@ -213,7 +211,7 @@ ErrorOr<ImageFrameDescriptor> ICOImageDecoderPlugin::frame(size_t index, Optiona
|
|||
|
||||
if (m_context->state < ICOLoadingContext::State::BitmapDecoded) {
|
||||
// NOTE: This forces the chunk decoding to happen.
|
||||
auto maybe_error = load_ico_bitmap(*m_context, {});
|
||||
auto maybe_error = load_ico_bitmap(*m_context);
|
||||
if (maybe_error.is_error()) {
|
||||
m_context->state = ICOLoadingContext::State::Error;
|
||||
return Error::from_string_literal("ICOImageDecoderPlugin: Decoding failed");
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
|
||||
private:
|
||||
ICOImageDecoderPlugin(u8 const*, size_t);
|
||||
static ErrorOr<void> load_ico_bitmap(ICOLoadingContext& context, Optional<size_t> index);
|
||||
static ErrorOr<void> load_ico_bitmap(ICOLoadingContext& context);
|
||||
|
||||
OwnPtr<ICOLoadingContext> m_context;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue