diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGUI/FileSystemModel.cpp | 21 | ||||
-rw-r--r-- | Userland/Libraries/LibGUI/Progressbar.cpp | 4 |
2 files changed, 12 insertions, 13 deletions
diff --git a/Userland/Libraries/LibGUI/FileSystemModel.cpp b/Userland/Libraries/LibGUI/FileSystemModel.cpp index 4b63d81805..f6c7cea890 100644 --- a/Userland/Libraries/LibGUI/FileSystemModel.cpp +++ b/Userland/Libraries/LibGUI/FileSystemModel.cpp @@ -268,20 +268,19 @@ static String permission_string(mode_t mode) else builder.append("?"); - builder.appendf("%c%c%c%c%c%c%c%c", - mode & S_IRUSR ? 'r' : '-', - mode & S_IWUSR ? 'w' : '-', - mode & S_ISUID ? 's' : (mode & S_IXUSR ? 'x' : '-'), - mode & S_IRGRP ? 'r' : '-', - mode & S_IWGRP ? 'w' : '-', - mode & S_ISGID ? 's' : (mode & S_IXGRP ? 'x' : '-'), - mode & S_IROTH ? 'r' : '-', - mode & S_IWOTH ? 'w' : '-'); + builder.append(mode & S_IRUSR ? 'r' : '-'); + builder.append(mode & S_IWUSR ? 'w' : '-'); + builder.append(mode & S_ISUID ? 's' : (mode & S_IXUSR ? 'x' : '-')); + builder.append(mode & S_IRGRP ? 'r' : '-'); + builder.append(mode & S_IWGRP ? 'w' : '-'); + builder.append(mode & S_ISGID ? 's' : (mode & S_IXGRP ? 'x' : '-')); + builder.append(mode & S_IROTH ? 'r' : '-'); + builder.append(mode & S_IWOTH ? 'w' : '-'); if (mode & S_ISVTX) - builder.append("t"); + builder.append('t'); else - builder.appendf("%c", mode & S_IXOTH ? 'x' : '-'); + builder.append(mode & S_IXOTH ? 'x' : '-'); return builder.to_string(); } diff --git a/Userland/Libraries/LibGUI/Progressbar.cpp b/Userland/Libraries/LibGUI/Progressbar.cpp index df5300ac30..dcdd409142 100644 --- a/Userland/Libraries/LibGUI/Progressbar.cpp +++ b/Userland/Libraries/LibGUI/Progressbar.cpp @@ -66,9 +66,9 @@ void Progressbar::paint_event(PaintEvent& event) if (m_format == Format::Percentage) { float range_size = m_max - m_min; float progress = (m_value - m_min) / range_size; - builder.appendf("%d%%", (int)(progress * 100)); + builder.appendff("{}%", (int)(progress * 100)); } else if (m_format == Format::ValueSlashMax) { - builder.appendf("%d/%d", m_value, m_max); + builder.appendff("{}/{}", m_value, m_max); } progress_text = builder.to_string(); } |