mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +00:00
Everywhere: Use ReadonlySpan<T> instead of Span<T const>
This commit is contained in:
parent
1c92e6ee9d
commit
63b11030f0
102 changed files with 206 additions and 206 deletions
|
@ -420,7 +420,7 @@ Vector<Web::Cookie::Cookie> CookieJar::get_matching_cookies(const URL& url, Depr
|
|||
return cookie_list;
|
||||
}
|
||||
|
||||
static ErrorOr<Web::Cookie::Cookie> parse_cookie(Span<SQL::Value const> row)
|
||||
static ErrorOr<Web::Cookie::Cookie> parse_cookie(ReadonlySpan<SQL::Value> row)
|
||||
{
|
||||
if (row.size() != 12)
|
||||
return Error::from_string_view("Incorrect number of columns to parse cookie"sv);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
namespace Browser {
|
||||
|
||||
class Database : public RefCounted<Database> {
|
||||
using OnResult = Function<void(Span<SQL::Value const>)>;
|
||||
using OnResult = Function<void(ReadonlySpan<SQL::Value>)>;
|
||||
using OnComplete = Function<void()>;
|
||||
using OnError = Function<void(StringView)>;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <spawn.h>
|
||||
#include <unistd.h>
|
||||
|
||||
using StringViewListModel = GUI::ItemListModel<StringView, Span<StringView const>>;
|
||||
using StringViewListModel = GUI::ItemListModel<StringView, ReadonlySpan<StringView>>;
|
||||
|
||||
static constexpr auto PI_OVER_180 = M_PIf32 / 180.0f;
|
||||
static constexpr auto PI_OVER_4 = M_PIf32 / 4.0f;
|
||||
|
|
|
@ -366,7 +366,7 @@ void HexEditorWidget::update_inspector_values(size_t position)
|
|||
value_inspector_model->set_parsed_value(ValueInspectorModel::ValueType::UTF8, utf8_view.unicode_substring_view(0, 1).as_string());
|
||||
|
||||
if (byte_read_count % 2 == 0) {
|
||||
Utf16View utf16_view { Span<u16 const> { reinterpret_cast<u16 const*>(&unsigned_64_bit_int), 4 } };
|
||||
Utf16View utf16_view { ReadonlySpan<u16> { reinterpret_cast<u16 const*>(&unsigned_64_bit_int), 4 } };
|
||||
size_t valid_code_units;
|
||||
utf16_view.validate(valid_code_units);
|
||||
if (valid_code_units == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue