From 7f07ee938bbd51647ac117d67ff460189bbd080b Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Mon, 25 Aug 2025 17:31:44 +0200 Subject: [PATCH] chore: remove old code that is no longer needed --- include/dwarfs/writer/internal/entry.h | 1 - include/dwarfs/writer/internal/progress.h | 6 ------ src/writer/internal/entry.cpp | 2 -- src/writer/scanner.cpp | 3 --- 4 files changed, 12 deletions(-) diff --git a/include/dwarfs/writer/internal/entry.h b/include/dwarfs/writer/internal/entry.h index 622455d2..30f16dc3 100644 --- a/include/dwarfs/writer/internal/entry.h +++ b/include/dwarfs/writer/internal/entry.h @@ -79,7 +79,6 @@ class entry : public entry_interface { bool has_parent() const; std::shared_ptr parent() const; - void clear_name(); std::filesystem::path fs_path() const; std::string path_as_string() const override; std::string dpath() const override; diff --git a/include/dwarfs/writer/internal/progress.h b/include/dwarfs/writer/internal/progress.h index 81de13f0..bcd4158a 100644 --- a/include/dwarfs/writer/internal/progress.h +++ b/include/dwarfs/writer/internal/progress.h @@ -81,12 +81,6 @@ class progress { return ctx; } - template - void run_sync(T&& fun) const { - std::lock_guard lock{mx_}; - std::forward(fun)(); - } - std::vector> get_active_contexts() const; // NOLINTBEGIN(cppcoreguidelines-non-private-member-variables-in-classes) diff --git a/src/writer/internal/entry.cpp b/src/writer/internal/entry.cpp index 04497e37..bedfeaf9 100644 --- a/src/writer/internal/entry.cpp +++ b/src/writer/internal/entry.cpp @@ -80,8 +80,6 @@ bool entry::has_parent() const { return static_cast(parent_.lock()); } std::shared_ptr entry::parent() const { return parent_.lock(); } -void entry::clear_name() { name_.clear(); } - std::u8string entry::u8name() const { return string_to_u8string(name_); } fs::path entry::fs_path() const { diff --git a/src/writer/scanner.cpp b/src/writer/scanner.cpp index ce12dfca..1e7c711f 100644 --- a/src/writer/scanner.cpp +++ b/src/writer/scanner.cpp @@ -906,9 +906,6 @@ void scanner_::scan( }); prog.current.store(nullptr); - // this is actually needed - prog.run_sync([&] { root->clear_name(); }); - LOG_INFO << "saving chunks..."; mdb.gather_chunks(im, *blockmgr, prog.chunk_count);