1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:57:45 +00:00

Everywhere: Convert a handful of String::format() => formatted()

This commit is contained in:
Andreas Kling 2021-01-16 12:00:33 +01:00
parent c90b7881a7
commit c71807a3fc
23 changed files with 24 additions and 24 deletions

View file

@ -172,7 +172,7 @@ void DevicesModel::update()
Core::DirIterator dir_iter { dir, Core::DirIterator::Flags::SkipDots };
while (dir_iter.has_next()) {
auto name = dir_iter.next_path();
auto path = String::format("%s/%s", dir.characters(), name.characters());
auto path = String::formatted("{}/{}", dir, name);
struct stat statbuf;
if (lstat(path.characters(), &statbuf) != 0) {
ASSERT_NOT_REACHED();

View file

@ -245,7 +245,7 @@ int main(int argc, char** argv)
Gfx::Bitmap::load_from_file("/res/icons/16x16/app-profiler.png"), [&](auto&) {
pid_t pid = selected_id(ProcessModel::Column::PID);
if (pid != -1) {
auto pid_string = String::format("%d", pid);
auto pid_string = String::number(pid);
pid_t child;
const char* argv[] = { "/bin/Profiler", "--pid", pid_string.characters(), nullptr };
if ((errno = posix_spawn(&child, "/bin/Profiler", nullptr, nullptr, const_cast<char**>(argv), environ))) {
@ -261,7 +261,7 @@ int main(int argc, char** argv)
Gfx::Bitmap::load_from_file("/res/icons/16x16/app-inspector.png"), [&](auto&) {
pid_t pid = selected_id(ProcessModel::Column::PID);
if (pid != -1) {
auto pid_string = String::format("%d", pid);
auto pid_string = String::number(pid);
pid_t child;
const char* argv[] = { "/bin/Inspector", pid_string.characters(), nullptr };
if ((errno = posix_spawn(&child, "/bin/Inspector", nullptr, nullptr, const_cast<char**>(argv), environ))) {