refactor: remove internal methods from public interface

This commit is contained in:
Marcus Holland-Moritz 2024-08-20 22:36:49 +02:00
parent e6d69866a3
commit 0e3ceb0b30
3 changed files with 4 additions and 13 deletions

View File

@ -96,10 +96,6 @@ class dir_entry_view {
std::filesystem::path fs_path() const;
std::wstring wpath() const;
void append_to(std::filesystem::path& p) const;
uint32_t self_index() const;
internal::dir_entry_view_impl const& raw() const { return *impl_; }
private:

View File

@ -1171,8 +1171,8 @@ void metadata_<LoggerPolicy>::dump(
os << " (" << count << " entries, parent=" << dir.parent_entry() << ")\n";
for (size_t i = 0; i < count; ++i) {
dump(os, indent, make_dir_entry_view(first + i, entry.self_index()), opts,
icb);
dump(os, indent, make_dir_entry_view(first + i, entry.raw().self_index()),
opts, icb);
}
}
@ -1328,7 +1328,8 @@ nlohmann::json metadata_<LoggerPolicy>::as_json(directory_view dir,
auto first = dir.first_entry();
for (size_t i = 0; i < count; ++i) {
arr.push_back(as_json(make_dir_entry_view(first + i, entry.self_index())));
arr.push_back(
as_json(make_dir_entry_view(first + i, entry.raw().self_index())));
}
return arr;

View File

@ -87,12 +87,6 @@ std::filesystem::path dir_entry_view::fs_path() const {
std::wstring dir_entry_view::wpath() const { return impl_->wpath(); }
void dir_entry_view::append_to(std::filesystem::path& p) const {
impl_->append_to(p);
}
uint32_t dir_entry_view::self_index() const { return impl_->self_index(); }
uint32_t directory_view::first_entry(uint32_t ino) const {
return g_->first_dir_entry(ino);
}