mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
LibCore: Take StringViews by value in Stream::* function arguments
This commit is contained in:
parent
8a1dfbd484
commit
07f444439c
Notes:
sideshowbarker
2024-07-17 19:44:03 +09:00
Author: https://github.com/alimpfard
Commit: 07f444439c
Pull-request: https://github.com/SerenityOS/serenity/pull/12235
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/sin-ack ✅
2 changed files with 8 additions and 8 deletions
|
@ -91,7 +91,7 @@ ErrorOr<off_t> SeekableStream::size()
|
|||
return seek_result.value();
|
||||
}
|
||||
|
||||
ErrorOr<NonnullOwnPtr<File>> File::open(StringView const& filename, OpenMode mode, mode_t permissions)
|
||||
ErrorOr<NonnullOwnPtr<File>> File::open(StringView filename, OpenMode mode, mode_t permissions)
|
||||
{
|
||||
auto file = TRY(adopt_nonnull_own_or_enomem(new (nothrow) File(mode)));
|
||||
TRY(file->open_path(filename, permissions));
|
||||
|
@ -114,7 +114,7 @@ ErrorOr<NonnullOwnPtr<File>> File::adopt_fd(int fd, OpenMode mode)
|
|||
return file;
|
||||
}
|
||||
|
||||
ErrorOr<void> File::open_path(StringView const& filename, mode_t permissions)
|
||||
ErrorOr<void> File::open_path(StringView filename, mode_t permissions)
|
||||
{
|
||||
VERIFY(m_fd == -1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue