mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-19 01:07:00 -04:00
refactor: make segmenter use std::function
This commit is contained in:
parent
75d6c92821
commit
f76d341317
@ -22,11 +22,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <folly/Function.h>
|
|
||||||
|
|
||||||
namespace dwarfs {
|
namespace dwarfs {
|
||||||
|
|
||||||
class block_data;
|
class block_data;
|
||||||
@ -48,8 +47,8 @@ class segmenter {
|
|||||||
unsigned block_size_bits{22};
|
unsigned block_size_bits{22};
|
||||||
};
|
};
|
||||||
|
|
||||||
using block_ready_cb = folly::Function<void(std::shared_ptr<block_data>,
|
using block_ready_cb = std::function<void(std::shared_ptr<block_data>,
|
||||||
size_t logical_block_num)>;
|
size_t logical_block_num)>;
|
||||||
|
|
||||||
segmenter(logger& lgr, progress& prog, std::shared_ptr<block_manager> blkmgr,
|
segmenter(logger& lgr, progress& prog, std::shared_ptr<block_manager> blkmgr,
|
||||||
config const& cfg, compression_constraints const& cc,
|
config const& cfg, compression_constraints const& cc,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user