mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:48:11 +00:00
Everywhere: Replace single-char StringView op. arguments with chars
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
This commit is contained in:
parent
3f3f45580a
commit
c8585b77d2
86 changed files with 283 additions and 283 deletions
|
@ -296,21 +296,21 @@ static String permission_string(mode_t mode)
|
|||
{
|
||||
StringBuilder builder;
|
||||
if (S_ISDIR(mode))
|
||||
builder.append("d");
|
||||
builder.append('d');
|
||||
else if (S_ISLNK(mode))
|
||||
builder.append("l");
|
||||
builder.append('l');
|
||||
else if (S_ISBLK(mode))
|
||||
builder.append("b");
|
||||
builder.append('b');
|
||||
else if (S_ISCHR(mode))
|
||||
builder.append("c");
|
||||
builder.append('c');
|
||||
else if (S_ISFIFO(mode))
|
||||
builder.append("f");
|
||||
builder.append('f');
|
||||
else if (S_ISSOCK(mode))
|
||||
builder.append("s");
|
||||
builder.append('s');
|
||||
else if (S_ISREG(mode))
|
||||
builder.append("-");
|
||||
builder.append('-');
|
||||
else
|
||||
builder.append("?");
|
||||
builder.append('?');
|
||||
|
||||
builder.append(mode & S_IRUSR ? 'r' : '-');
|
||||
builder.append(mode & S_IWUSR ? 'w' : '-');
|
||||
|
@ -384,7 +384,7 @@ void FileSystemModel::handle_file_event(Core::FileWatcherEvent const& event)
|
|||
LexicalPath path { event.event_path };
|
||||
auto& parts = path.parts_view();
|
||||
StringView child_name = parts.last();
|
||||
if (!m_should_show_dotfiles && child_name.starts_with("."))
|
||||
if (!m_should_show_dotfiles && child_name.starts_with('.'))
|
||||
break;
|
||||
|
||||
auto parent_name = path.parent().string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue