From 633f0067c1dc57ddd52e9a7fbd616a914f932bab Mon Sep 17 00:00:00 2001 From: MacDue Date: Tue, 12 Mar 2024 19:26:41 +0000 Subject: [PATCH] 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. --- Userland/Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp index 59d0f7d5cc..b987a8ff51 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp @@ -364,7 +364,7 @@ ErrorOr> 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 {