public:
DecayRate() : k(0) {}
+ // cppcheck-suppress noExplicitConstructor
DecayRate(double hl) { set_halflife(hl); }
void set_halflife(double hl) {
k = ::log(.5) / hl;
// threads
struct WorkThread : public Thread {
ThreadPool *pool;
+ // cppcheck-suppress noExplicitConstructor
WorkThread(ThreadPool *p) : pool(p) {}
void *entry() {
pool->worker(this);
virtual ~raw() {}
// no copying.
+ // cppcheck-suppress noExplicitConstructor
raw(const raw &other);
const raw& operator=(const raw &other);
public:
ptr() : _raw(0), _off(0), _len(0) {}
+ // cppcheck-suppress noExplicitConstructor
ptr(raw *r);
+ // cppcheck-suppress noExplicitConstructor
ptr(unsigned l);
ptr(const char *d, unsigned l);
ptr(const ptr& p);
public:
// cons/des
list() : _len(0), _memcopy_count(0), last_p(this) {}
+ // cppcheck-suppress noExplicitConstructor
list(unsigned prealloc) : _len(0), _memcopy_count(0), last_p(this) {
append_buffer = buffer::create(prealloc);
append_buffer.set_length(0); // unused, so far.
public:
hash() : crc(0) { }
+ // cppcheck-suppress noExplicitConstructor
hash(uint32_t init) : crc(init) { }
void update(buffer::list& bl) {
string name;
object_t() {}
+ // cppcheck-suppress noExplicitConstructor
object_t(const char *s) : name(s) {}
+ // cppcheck-suppress noExplicitConstructor
object_t(const string& s) : name(s) {}
void swap(object_t& o) {
struct snapid_t {
uint64_t val;
+ // cppcheck-suppress noExplicitConstructor
snapid_t(uint64_t v=0) : val(v) {}
snapid_t operator+=(snapid_t o) { val += o.val; return *this; }
snapid_t operator++() { ++val; return *this; }
struct client_t {
int64_t v;
+ // cppcheck-suppress noExplicitConstructor
client_t(int64_t _v = -2) : v(_v) {}
void encode(bufferlist& bl) const {
struct inodeno_t {
_inodeno_t val;
inodeno_t() : val(0) {}
+ // cppcheck-suppress noExplicitConstructor
inodeno_t(_inodeno_t v) : val(v) {}
inodeno_t operator+=(inodeno_t o) { val += o.val; return *this; }
operator _inodeno_t() const { return val; }
struct prettybyte_t {
uint64_t v;
+ // cppcheck-suppress noExplicitConstructor
prettybyte_t(uint64_t _v) : v(_v) {}
};
struct si_t {
uint64_t v;
+ // cppcheck-suppress noExplicitConstructor
si_t(uint64_t _v) : v(_v) {}
};
struct pretty_si_t {
uint64_t v;
+ // cppcheck-suppress noExplicitConstructor
pretty_si_t(uint64_t _v) : v(_v) {}
};
struct kb_t {
uint64_t v;
+ // cppcheck-suppress noExplicitConstructor
kb_t(uint64_t _v) : v(_v) {}
};
struct weightf_t {
float v;
+ // cppcheck-suppress noExplicitConstructor
weightf_t(float _v) : v(_v) {}
};
int32_t code;
errorcode32_t() {}
+ // cppcheck-suppress noExplicitConstructor
errorcode32_t(int32_t i) : code(i) {}
operator int() const { return code; }
struct mon_rwxa_t {
__u8 val;
+ // cppcheck-suppress noExplicitConstructor
mon_rwxa_t(__u8 v = 0) : val(v) {}
mon_rwxa_t& operator=(__u8 v) {
val = v;
void expand_profile(EntityName name) const;
MonCapGrant() : allow(0) {}
+ // cppcheck-suppress noExplicitConstructor
MonCapGrant(mon_rwxa_t a) : allow(a) {}
MonCapGrant(string s, mon_rwxa_t a) : service(s), allow(a) {}
+ // cppcheck-suppress noExplicitConstructor
MonCapGrant(string c) : command(c) {}
MonCapGrant(string c, string a, StringConstraint co) : command(c) {
command_args[a] = co;
entity_addr_t addr;
entity_inst_t() {}
entity_inst_t(entity_name_t n, const entity_addr_t& a) : name(n), addr(a) {}
+ // cppcheck-suppress noExplicitConstructor
entity_inst_t(const ceph_entity_inst& i) : name(i.name), addr(i.addr) { }
entity_inst_t(const ceph_entity_name& n, const ceph_entity_addr &a) : name(n), addr(a) {}
operator ceph_entity_inst() {
void operator()(PGScrub &op);
};
public:
+ // cppcheck-suppress noExplicitConstructor
PGQueueable(OpRequestRef op)
: qvariant(op), cost(op->get_req()->get_cost()),
priority(op->get_req()->get_priority()),
struct osd_rwxa_t {
__u8 val;
+ // cppcheck-suppress noExplicitConstructor
osd_rwxa_t(__u8 v = 0) : val(v) {}
osd_rwxa_t& operator=(__u8 v) {
val = v;
check();
}
public:
+ // cppcheck-suppress noExplicitConstructor
PGLog(CephContext *cct = 0) :
dirty_from(eversion_t::max()),
writeout_from(eversion_t::max()),
pg_t() : m_pool(0), m_seed(0), m_preferred(-1) {}
pg_t(ps_t seed, uint64_t pool, int pref=-1) :
m_pool(pool), m_seed(seed), m_preferred(pref) {}
+ // cppcheck-suppress noExplicitConstructor
pg_t(const ceph_pg& cpg) :
m_pool(cpg.pool), m_seed(cpg.ps), m_preferred((__s16)cpg.preferred) {}
+ // cppcheck-suppress noExplicitConstructor
pg_t(const old_pg_t& opg) {
*this = opg.v;
}
eversion_t() : version(0), epoch(0), __pad(0) {}
eversion_t(epoch_t e, version_t v) : version(v), epoch(e), __pad(0) {}
+ // cppcheck-suppress noExplicitConstructor
eversion_t(const ceph_eversion& ce) :
version(ce.version),
epoch(ce.epoch),
last_backfill(hobject_t::get_max()),
last_backfill_bitwise(false)
{ }
+ // cppcheck-suppress noExplicitConstructor
pg_info_t(spg_t p)
: pgid(p),
last_epoch_started(0), last_user_version(0),
std::string id;
rgw_user() {}
+ // cppcheck-suppress noExplicitConstructor
rgw_user(const std::string& s) {
from_str(s);
}
*/
rgw_bucket() { }
+ // cppcheck-suppress noExplicitConstructor
rgw_bucket(const cls_user_bucket& b) : name(b.name), data_pool(b.data_pool),
data_extra_pool(b.data_extra_pool),
index_pool(b.index_pool), marker(b.marker),
bucket_id(b.bucket_id) {}
+ // cppcheck-suppress noExplicitConstructor
rgw_bucket(const char *n) : name(n) {
assert(*n == '.'); // only rgw private buckets should be initialized without pool
data_pool = index_pool = n;
string instance;
rgw_obj_key() {}
+ // cppcheck-suppress noExplicitConstructor
rgw_obj_key(const string& n) {
set(n);
}
set(n, i);
}
+ // cppcheck-suppress noExplicitConstructor
rgw_obj_key(const cls_rgw_obj_key& k) {
set(k);
}
// helper class for bytes with units
struct byte_units {
size_t v;
+ // cppcheck-suppress noExplicitConstructor
byte_units(size_t v) : v(v) {}
bool parse(const std::string &val, std::string *err);