mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:08:10 +00:00
LibGfx/ICO: Remove unused parameter
This commit is contained in:
parent
aef188207c
commit
15d151ee66
2 changed files with 4 additions and 6 deletions
|
@ -136,13 +136,11 @@ static ErrorOr<void> load_ico_directory(ICOLoadingContext& context)
|
||||||
return {};
|
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);
|
VERIFY(context.state >= ICOLoadingContext::State::DirectoryDecoded);
|
||||||
|
|
||||||
size_t real_index = context.largest_index;
|
size_t const real_index = context.largest_index;
|
||||||
if (index.has_value())
|
|
||||||
real_index = index.value();
|
|
||||||
if (real_index >= context.images.size())
|
if (real_index >= context.images.size())
|
||||||
return Error::from_string_literal("Index out of bounds");
|
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) {
|
if (m_context->state < ICOLoadingContext::State::BitmapDecoded) {
|
||||||
// NOTE: This forces the chunk decoding to happen.
|
// 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()) {
|
if (maybe_error.is_error()) {
|
||||||
m_context->state = ICOLoadingContext::State::Error;
|
m_context->state = ICOLoadingContext::State::Error;
|
||||||
return Error::from_string_literal("ICOImageDecoderPlugin: Decoding failed");
|
return Error::from_string_literal("ICOImageDecoderPlugin: Decoding failed");
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ICOImageDecoderPlugin(u8 const*, size_t);
|
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;
|
OwnPtr<ICOLoadingContext> m_context;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue