mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 13:04:15 -04:00
refactor: use std::function in filesystem_(extractor|writer)
This commit is contained in:
parent
dd72ef3f65
commit
42c0bc528a
@ -22,13 +22,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <folly/Function.h>
|
||||
|
||||
namespace dwarfs {
|
||||
|
||||
class filesystem_v2;
|
||||
@ -38,7 +37,7 @@ class os_access;
|
||||
struct filesystem_extractor_options {
|
||||
size_t max_queued_bytes{4096};
|
||||
bool continue_on_error{false};
|
||||
folly::Function<void(std::string_view, uint64_t, uint64_t) const> progress;
|
||||
std::function<void(std::string_view, uint64_t, uint64_t)> progress;
|
||||
};
|
||||
|
||||
class filesystem_extractor {
|
||||
|
@ -23,14 +23,13 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <span>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <folly/Function.h>
|
||||
|
||||
#include <dwarfs/compression_constraints.h>
|
||||
#include <dwarfs/fragment_category.h>
|
||||
#include <dwarfs/fs_section.h>
|
||||
@ -48,7 +47,7 @@ class worker_group;
|
||||
|
||||
class filesystem_writer {
|
||||
public:
|
||||
using physical_block_cb_type = folly::Function<void(size_t)>;
|
||||
using physical_block_cb_type = std::function<void(size_t)>;
|
||||
|
||||
filesystem_writer(
|
||||
std::ostream& os, logger& lgr, worker_group& wg, progress& prog,
|
||||
|
Loading…
x
Reference in New Issue
Block a user