mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 17:48:37 +00:00
Userland: Remove erroneous String -> char* -> StringView conversions
These were accidental (or leftover) uses of String::characters() to construct StringViews through its StringView(char const*) constructor. Since this constructor is due to be removed, this will no longer work. Plus this prevents strlen from being run on these strings unnecessarily.
This commit is contained in:
parent
60f6bc902b
commit
a3eeeaa6a1
Notes:
sideshowbarker
2024-07-17 09:27:31 +09:00
Author: https://github.com/sin-ack
Commit: a3eeeaa6a1
Pull-request: https://github.com/SerenityOS/serenity/pull/14555
Reviewed-by: https://github.com/Dexesttp ✅
Reviewed-by: https://github.com/kleinesfilmroellchen
3 changed files with 3 additions and 3 deletions
|
@ -120,7 +120,7 @@ ErrorOr<void> parse_args(Main::Arguments arguments, Vector<String>& files, DuOpt
|
|||
|
||||
ErrorOr<off_t> print_space_usage(String const& path, DuOption const& du_option, int max_depth, bool inside_dir)
|
||||
{
|
||||
struct stat path_stat = TRY(Core::System::lstat(path.characters()));
|
||||
struct stat path_stat = TRY(Core::System::lstat(path));
|
||||
off_t directory_size = 0;
|
||||
bool const is_directory = S_ISDIR(path_stat.st_mode);
|
||||
if (--max_depth >= 0 && is_directory) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue