mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-11 13:30:47 -04:00
Fix ctors that were missing explicit keyword
This commit is contained in:
parent
7750bc582e
commit
7c0b22d3bd
@ -72,7 +72,7 @@ struct options {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct dwarfs_userdata {
|
struct dwarfs_userdata {
|
||||||
dwarfs_userdata(std::ostream& os)
|
explicit dwarfs_userdata(std::ostream& os)
|
||||||
: lgr{os} {}
|
: lgr{os} {}
|
||||||
|
|
||||||
options opts;
|
options opts;
|
||||||
|
@ -404,7 +404,7 @@ class zstd_block_compressor final : public block_compressor::impl {
|
|||||||
|
|
||||||
class scoped_context {
|
class scoped_context {
|
||||||
public:
|
public:
|
||||||
scoped_context(context_manager& mgr)
|
explicit scoped_context(context_manager& mgr)
|
||||||
: mgr_{&mgr}
|
: mgr_{&mgr}
|
||||||
, ctx_{mgr_->acquire()} {}
|
, ctx_{mgr_->acquire()} {}
|
||||||
~scoped_context() { mgr_->release(ctx_); }
|
~scoped_context() { mgr_->release(ctx_); }
|
||||||
|
@ -168,7 +168,7 @@ class bloom_filter {
|
|||||||
static constexpr size_t index_shift = bitcount(value_mask);
|
static constexpr size_t index_shift = bitcount(value_mask);
|
||||||
static constexpr size_t alignment = 64;
|
static constexpr size_t alignment = 64;
|
||||||
|
|
||||||
bloom_filter(size_t size)
|
explicit bloom_filter(size_t size)
|
||||||
: index_mask_{(std::max(size, value_mask + 1) >> index_shift) - 1}
|
: index_mask_{(std::max(size, value_mask + 1) >> index_shift) - 1}
|
||||||
, size_{std::max(size, value_mask + 1)} {
|
, size_{std::max(size, value_mask + 1)} {
|
||||||
if (size & (size - 1)) {
|
if (size & (size - 1)) {
|
||||||
|
@ -65,7 +65,7 @@ bool has_callable(py::object obj, char const* method) {
|
|||||||
|
|
||||||
class py_logger {
|
class py_logger {
|
||||||
public:
|
public:
|
||||||
py_logger(logger& lgr)
|
explicit py_logger(logger& lgr)
|
||||||
: log_(lgr) {}
|
: log_(lgr) {}
|
||||||
|
|
||||||
void error(std::string const& msg) { LOG_ERROR << "[script] " << msg; }
|
void error(std::string const& msg) { LOG_ERROR << "[script] " << msg; }
|
||||||
@ -82,7 +82,7 @@ class py_logger {
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
class basic_entry_wrapper {
|
class basic_entry_wrapper {
|
||||||
public:
|
public:
|
||||||
basic_entry_wrapper(T& entry)
|
explicit basic_entry_wrapper(T& entry)
|
||||||
: entry_(&entry) {}
|
: entry_(&entry) {}
|
||||||
|
|
||||||
size_t size() const { return entry_->size(); }
|
size_t size() const { return entry_->size(); }
|
||||||
@ -112,7 +112,7 @@ using mutable_entry_wrapper = basic_entry_wrapper<entry_interface>;
|
|||||||
|
|
||||||
class inode_wrapper {
|
class inode_wrapper {
|
||||||
public:
|
public:
|
||||||
inode_wrapper(inode const* ino)
|
explicit inode_wrapper(inode const* ino)
|
||||||
: ino_(ino) {}
|
: ino_(ino) {}
|
||||||
|
|
||||||
size_t similarity_hash() const { return ino_->similarity_hash(); }
|
size_t similarity_hash() const { return ino_->similarity_hash(); }
|
||||||
@ -158,7 +158,7 @@ class python_script::impl {
|
|||||||
|
|
||||||
class timer {
|
class timer {
|
||||||
public:
|
public:
|
||||||
timer(clock::duration& d)
|
explicit timer(clock::duration& d)
|
||||||
: start_(clock::now())
|
: start_(clock::now())
|
||||||
, d_(d) {}
|
, d_(d) {}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace dwarfs {
|
|||||||
|
|
||||||
class legacy_string_table : public string_table::impl {
|
class legacy_string_table : public string_table::impl {
|
||||||
public:
|
public:
|
||||||
legacy_string_table(string_table::LegacyTableView v)
|
explicit legacy_string_table(string_table::LegacyTableView v)
|
||||||
: v_{v} {}
|
: v_{v} {}
|
||||||
|
|
||||||
std::string lookup(size_t index) const override {
|
std::string lookup(size_t index) const override {
|
||||||
|
@ -97,7 +97,7 @@ class process_guard {
|
|||||||
public:
|
public:
|
||||||
process_guard() = default;
|
process_guard() = default;
|
||||||
|
|
||||||
process_guard(pid_t pid)
|
explicit process_guard(pid_t pid)
|
||||||
: pid_{pid} {
|
: pid_{pid} {
|
||||||
auto proc_dir =
|
auto proc_dir =
|
||||||
std::filesystem::path("/proc") / folly::to<std::string>(pid);
|
std::filesystem::path("/proc") / folly::to<std::string>(pid);
|
||||||
|
@ -128,7 +128,7 @@ void os_access_mock::mock_directory::add(
|
|||||||
|
|
||||||
class dir_reader_mock : public dir_reader {
|
class dir_reader_mock : public dir_reader {
|
||||||
public:
|
public:
|
||||||
dir_reader_mock(std::vector<std::string>&& files)
|
explicit dir_reader_mock(std::vector<std::string>&& files)
|
||||||
: files_(files)
|
: files_(files)
|
||||||
, index_(0) {}
|
, index_(0) {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user