Skip to content

Commit

Permalink
LibGfx: Remove suspicious const& in TinyVGLoader
Browse files Browse the repository at this point in the history
`decode_color_table()` returns a vector by value (not reference), so
assigning it to a const reference (while legal), seems odd.
  • Loading branch information
MacDue authored and AtkinsSJ committed Mar 12, 2024
1 parent bf11f4f commit 633f006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 633f006

Please sign in to comment.