From 96242a3e4f76b7259d03bf8fdabf9835f612f5a4 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Thu, 9 May 2024 16:45:14 +0200 Subject: [PATCH] refactor: remove redundant string construction --- src/dwarfs_main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dwarfs_main.cpp b/src/dwarfs_main.cpp index 6156d7d8..91ad260f 100644 --- a/src/dwarfs_main.cpp +++ b/src/dwarfs_main.cpp @@ -775,8 +775,7 @@ int op_readdir_common(filesystem_v2& fs, Policy& policy, file_off_t off, auto res = fs.readdir(*dir, off); assert(res); - auto [entry, name_view] = *res; - std::string name(name_view); + auto [entry, name] = *res; fs.getattr(entry, &stbuf); copy_file_stat(&st, stbuf);