Browse Source

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.
MacDue 1 năm trước cách đây
mục cha
commit
633f0067c1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Userland/Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp

+ 1 - 1
Userland/Libraries/LibGfx/ImageFormats/TinyVGLoader.cpp

@@ -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 {