1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:08:13 +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:
MacDue 2024-03-12 19:26:41 +00:00 committed by Sam Atkins
parent bf11f4f73f
commit 633f0067c1

View file

@ -364,7 +364,7 @@ ErrorOr<NonnullRefPtr<TinyVGDecodedImageData>> TinyVGDecodedImageData::decode(St
if (header.version != 1)
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() };
auto rectangle_to_path = [](FloatRect const& rect) -> Path {