Skip to content

Commit

Permalink
remove helper-method for inner
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Oct 3, 2024
1 parent 8e1d4ac commit 505dc8a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion include/interface_destroy.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace yakushima {
if (storage::get_storages()->empty()) { return status::OK_ROOT_IS_NULL; }
std::vector<std::tuple<std::string, tree_instance*>>
tuple_list;
scan(storage::get_storages(), "", scan_endpoint::INF, "",
scan<tree_instance, false>(storage::get_storages(), "", scan_endpoint::INF, "",
scan_endpoint::INF, tuple_list, nullptr, 0);
for (auto&& elem : tuple_list) {
base_node* root = std::get<1>(elem)->load_root_ptr();
Expand Down
22 changes: 0 additions & 22 deletions include/interface_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,28 +126,6 @@ scan(tree_instance* ti, std::string_view l_key, scan_endpoint l_end,
}
}

template<class ValueType>
[[maybe_unused]] static status
scan(tree_instance* ti, std::string_view l_key, scan_endpoint l_end,
std::string_view r_key, scan_endpoint r_end,
std::vector<std::tuple<std::string, ValueType*, std::size_t>>& tuple_list,
std::vector<std::pair<node_version64_body, node_version64*>>*
node_version_vec,
std::size_t max_size) {
return scan<ValueType, true>(ti, l_key, l_end, r_key, r_end, tuple_list, node_version_vec, max_size);
}

template<class ValueType>
[[maybe_unused]] static status
scan(tree_instance* ti, std::string_view l_key, scan_endpoint l_end,
std::string_view r_key, scan_endpoint r_end,
std::vector<std::tuple<std::string, ValueType*>>& tuple_list,
std::vector<std::pair<node_version64_body, node_version64*>>*
node_version_vec,
std::size_t max_size) {
return scan<ValueType, false>(ti, l_key, l_end, r_key, r_end, tuple_list, node_version_vec, max_size);
}

template<class ValueType, bool NeedSize = true>
[[maybe_unused]] static status
scan2(std::string_view storage_name, std::string_view l_key, // NOLINT
Expand Down
2 changes: 1 addition & 1 deletion include/storage_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ status storage::list_storages(
out.clear();
std::vector<std::tuple<std::string, tree_instance*>>
tuple_list;
scan(get_storages(), "", scan_endpoint::INF, "", scan_endpoint::INF,
scan<tree_instance, false>(get_storages(), "", scan_endpoint::INF, "", scan_endpoint::INF,
tuple_list, nullptr, 0);
if (tuple_list.empty()) { return status::WARN_NOT_EXIST; }
out.reserve(tuple_list.size());
Expand Down

0 comments on commit 505dc8a

Please sign in to comment.