1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 19:17:44 +00:00

Everywhere: Use ReadonlySpan<T> instead of Span<T const>

This commit is contained in:
MacDue 2023-02-05 19:02:54 +00:00 committed by Linus Groh
parent 1c92e6ee9d
commit 63b11030f0
102 changed files with 206 additions and 206 deletions

View file

@ -25,7 +25,7 @@ public:
bool has_filters() const { return m_filter_value_list; }
bool is_none() const { return !has_filters(); }
Span<FilterFunction const> filters() const
ReadonlySpan<FilterFunction> filters() const
{
VERIFY(has_filters());
return m_filter_value_list->filter_value_list().span();

View file

@ -19,7 +19,7 @@
namespace Web::Painting {
void apply_filter_list(Gfx::Bitmap& target_bitmap, Layout::Node const& node, Span<CSS::FilterFunction const> filter_list)
void apply_filter_list(Gfx::Bitmap& target_bitmap, Layout::Node const& node, ReadonlySpan<CSS::FilterFunction> filter_list)
{
auto apply_color_filter = [&](Gfx::ColorFilter const& filter) {
const_cast<Gfx::ColorFilter&>(filter).apply(target_bitmap, target_bitmap.rect(), target_bitmap, target_bitmap.rect());

View file

@ -12,7 +12,7 @@
namespace Web::Painting {
void apply_filter_list(Gfx::Bitmap& target_bitmap, Layout::Node const& node, Span<CSS::FilterFunction const> filter_list);
void apply_filter_list(Gfx::Bitmap& target_bitmap, Layout::Node const& node, ReadonlySpan<CSS::FilterFunction> filter_list);
void apply_backdrop_filter(PaintContext&, Layout::Node const&, CSSPixelRect const&, BorderRadiiData const&, CSS::BackdropFilter const&);

View file

@ -107,7 +107,7 @@ void SVGPathElement::parse_attribute(DeprecatedFlyString const& name, Deprecated
}
}
Gfx::Path path_from_path_instructions(Span<PathInstruction const> instructions)
Gfx::Path path_from_path_instructions(ReadonlySpan<PathInstruction> instructions)
{
Gfx::Path path;
Optional<Gfx::FloatPoint> previous_control_point;

View file

@ -32,6 +32,6 @@ private:
Optional<Gfx::Path> m_path;
};
Gfx::Path path_from_path_instructions(Span<PathInstruction const>);
Gfx::Path path_from_path_instructions(ReadonlySpan<PathInstruction>);
}

View file

@ -21,7 +21,7 @@
namespace Web::WebDriver {
using Parameters = Span<StringView const>;
using Parameters = ReadonlySpan<StringView>;
class Client : public Core::Object {
C_OBJECT_ABSTRACT(Client);