mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
Everywhere: Pass AK::ReadonlyBytes by value
This commit is contained in:
parent
8b1108e485
commit
80d4e830a0
42 changed files with 96 additions and 96 deletions
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace Archive {
|
||||
|
||||
bool Zip::find_end_of_central_directory_offset(const ReadonlyBytes& buffer, size_t& offset)
|
||||
bool Zip::find_end_of_central_directory_offset(ReadonlyBytes buffer, size_t& offset)
|
||||
{
|
||||
for (size_t backwards_offset = 0; backwards_offset <= UINT16_MAX; backwards_offset++) // the file may have a trailing comment of an arbitrary 16 bit length
|
||||
{
|
||||
|
@ -24,7 +24,7 @@ bool Zip::find_end_of_central_directory_offset(const ReadonlyBytes& buffer, size
|
|||
return false;
|
||||
}
|
||||
|
||||
Optional<Zip> Zip::try_create(const ReadonlyBytes& buffer)
|
||||
Optional<Zip> Zip::try_create(ReadonlyBytes buffer)
|
||||
{
|
||||
size_t end_of_central_directory_offset;
|
||||
if (!find_end_of_central_directory_offset(buffer, end_of_central_directory_offset))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue