mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibGfx: Remove suspicious const&
in TinyVGLoader
`decode_color_table()` returns a vector by value (not reference), so assigning it to a const reference (while legal), seems odd.
This commit is contained in:
parent
bf11f4f73f
commit
633f0067c1
1 changed files with 1 additions and 1 deletions
|
@ -364,7 +364,7 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
|
||||||
if (header.version != 1)
|
if (header.version != 1)
|
||||||
return Error::from_string_literal("Invalid TinyVG: Unsupported version");
|
return Error::from_string_literal("Invalid TinyVG: Unsupported version");
|
||||||
|
|
||||||
auto const& color_table = TRY(decode_color_table(stream, header.color_encoding, header.color_count));
|
auto color_table = TRY(decode_color_table(stream, header.color_encoding, header.color_count));
|
||||||
TinyVGReader reader { stream, header, color_table.span() };
|
TinyVGReader reader { stream, header, color_table.span() };
|
||||||
|
|
||||||
auto rectangle_to_path = [](FloatRect const& rect) -> Path {
|
auto rectangle_to_path = [](FloatRect const& rect) -> Path {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue