Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: add override in header files mostly #13586

Merged
merged 1 commit into from
Mar 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/rgw/rgw_acl_s3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,29 +97,29 @@ class ACLID_S3 : public XMLObj
{
public:
ACLID_S3() {}
~ACLID_S3() {}
~ACLID_S3() override {}
string& to_str() { return data; }
};

class ACLURI_S3 : public XMLObj
{
public:
ACLURI_S3() {}
~ACLURI_S3() {}
~ACLURI_S3() override {}
};

class ACLEmail_S3 : public XMLObj
{
public:
ACLEmail_S3() {}
~ACLEmail_S3() {}
~ACLEmail_S3() override {}
};

class ACLDisplayName_S3 : public XMLObj
{
public:
ACLDisplayName_S3() {}
~ACLDisplayName_S3() {}
~ACLDisplayName_S3() override {}
};

bool ACLOwner_S3::xml_end(const char *el) {
Expand Down
26 changes: 13 additions & 13 deletions src/rgw/rgw_acl_s3.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ class ACLPermission_S3 : public ACLPermission, public XMLObj
{
public:
ACLPermission_S3() {}
~ACLPermission_S3() {}
~ACLPermission_S3() override {}

bool xml_end(const char *el);
bool xml_end(const char *el) override;
void to_xml(ostream& out);
};

class ACLGrantee_S3 : public ACLGrantee, public XMLObj
{
public:
ACLGrantee_S3() {}
~ACLGrantee_S3() {}
~ACLGrantee_S3() override {}

bool xml_start(const char *el, const char **attr);
};
Expand All @@ -42,10 +42,10 @@ class ACLGrant_S3 : public ACLGrant, public XMLObj
{
public:
ACLGrant_S3() {}
~ACLGrant_S3() {}
~ACLGrant_S3() override {}

void to_xml(CephContext *cct, ostream& out);
bool xml_end(const char *el);
bool xml_end(const char *el) override;
bool xml_start(const char *el, const char **attr);

static ACLGroupTypeEnum uri_to_group(string& uri);
Expand All @@ -56,9 +56,9 @@ class RGWAccessControlList_S3 : public RGWAccessControlList, public XMLObj
{
public:
explicit RGWAccessControlList_S3(CephContext *_cct) : RGWAccessControlList(_cct) {}
~RGWAccessControlList_S3() {}
~RGWAccessControlList_S3() override {}

bool xml_end(const char *el);
bool xml_end(const char *el) override;
void to_xml(ostream& out);

int create_canned(ACLOwner& owner, ACLOwner& bucket_owner, const string& canned_acl);
Expand All @@ -69,9 +69,9 @@ class ACLOwner_S3 : public ACLOwner, public XMLObj
{
public:
ACLOwner_S3() {}
~ACLOwner_S3() {}
~ACLOwner_S3() override {}

bool xml_end(const char *el);
bool xml_end(const char *el) override;
void to_xml(ostream& out);
};

Expand All @@ -81,13 +81,13 @@ class RGWAccessControlPolicy_S3 : public RGWAccessControlPolicy, public XMLObj
{
public:
explicit RGWAccessControlPolicy_S3(CephContext *_cct) : RGWAccessControlPolicy(_cct) {}
~RGWAccessControlPolicy_S3() {}
~RGWAccessControlPolicy_S3() override {}

bool xml_end(const char *el);
bool xml_end(const char *el) override;

void to_xml(ostream& out);
int rebuild(RGWRados *store, ACLOwner *owner, RGWAccessControlPolicy& dest);
bool compare_group_name(string& id, ACLGroupTypeEnum group);
bool compare_group_name(string& id, ACLGroupTypeEnum group) override;

virtual int create_canned(ACLOwner& _owner, ACLOwner& bucket_owner, string canned_acl) {
RGWAccessControlList_S3& _acl = static_cast<RGWAccessControlList_S3 &>(acl);
Expand All @@ -106,7 +106,7 @@ class RGWACLXMLParser_S3 : public RGWXMLParser
{
CephContext *cct;

XMLObj *alloc_obj(const char *el);
XMLObj *alloc_obj(const char *el) override;
public:
explicit RGWACLXMLParser_S3(CephContext *_cct) : cct(_cct) {}
};
Expand Down
4 changes: 2 additions & 2 deletions src/rgw/rgw_acl_swift.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RGWAccessControlPolicy_SWIFT : public RGWAccessControlPolicy
explicit RGWAccessControlPolicy_SWIFT(CephContext* const cct)
: RGWAccessControlPolicy(cct) {
}
~RGWAccessControlPolicy_SWIFT() = default;
~RGWAccessControlPolicy_SWIFT() override = default;

int create(RGWRados *store,
const rgw_user& id,
Expand All @@ -37,7 +37,7 @@ class RGWAccessControlPolicy_SWIFTAcct : public RGWAccessControlPolicy
RGWAccessControlPolicy_SWIFTAcct(CephContext * const cct)
: RGWAccessControlPolicy(cct) {
}
~RGWAccessControlPolicy_SWIFTAcct() {}
~RGWAccessControlPolicy_SWIFTAcct() override {}

void add_grants(RGWRados *store,
const std::vector<std::string>& uids,
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_asio_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RGWAsioClientIO : public rgw::io::RestfulClient,

public:
RGWAsioClientIO(tcp::socket&& socket, request_type&& request);
~RGWAsioClientIO();
~RGWAsioClientIO() override;

void init_env(CephContext *cct) override;
size_t complete_request() override;
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_asio_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RGWAsioFrontend : public RGWFrontend {
std::unique_ptr<Impl> impl;
public:
RGWAsioFrontend(const RGWProcessEnv& env);
~RGWAsioFrontend();
~RGWAsioFrontend() override;

int init() override;
int run() override;
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class RGWAuthApplier : public RGWIdentityApplier {
typedef std::unique_ptr<RGWAuthApplier> aplptr_t;

RGWAuthApplier(CephContext * const cct) : cct(cct) {}
virtual ~RGWAuthApplier() {};
~RGWAuthApplier() override {};

/* Fill provided RGWUserInfo with information about the account that
* RGWOp will operate on. Errors are handled solely through exceptions.
Expand Down
6 changes: 3 additions & 3 deletions src/rgw/rgw_bucket.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RGWBucketEntryMetadataObject : public RGWMetadataObject {
mtime = m;
}

void dump(Formatter *f) const {
void dump(Formatter *f) const override {
ep.dump(f);
}
};
Expand All @@ -88,7 +88,7 @@ class RGWBucketInstanceMetadataObject : public RGWMetadataObject {
mtime = m;
}

void dump(Formatter *f) const {
void dump(Formatter *f) const override {
info.dump(f);
}

Expand Down Expand Up @@ -433,7 +433,7 @@ class RGWDataChangesLog {

public:
ChangesRenewThread(CephContext *_cct, RGWDataChangesLog *_log) : cct(_cct), log(_log), lock("ChangesRenewThread::lock") {}
void *entry();
void *entry() override;
void stop();
};

Expand Down
22 changes: 11 additions & 11 deletions src/rgw/rgw_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class RGWCache : public T
return normal_name(obj.pool, obj.oid);
}

int init_rados() {
int init_rados() override {
int ret;
cache.set_ctx(T::cct);
ret = T::init_rados();
Expand All @@ -204,23 +204,23 @@ class RGWCache : public T
return 0;
}

bool need_watch_notify() {
bool need_watch_notify() override {
return true;
}

int distribute_cache(const string& normal_name, rgw_raw_obj& obj, ObjectCacheInfo& obj_info, int op);
int watch_cb(uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
bufferlist& bl);
bufferlist& bl) override;

void set_cache_enabled(bool state) {
void set_cache_enabled(bool state) override {
cache.set_enabled(state);
}
public:
RGWCache() {}

void register_chained_cache(RGWChainedCache *cc) {
void register_chained_cache(RGWChainedCache *cc) override {
cache.chain_cache(cc);
}

Expand All @@ -232,21 +232,21 @@ class RGWCache : public T
map<std::string, bufferlist>& attrs, int flags,
bufferlist& data,
RGWObjVersionTracker *objv_tracker,
real_time set_mtime);
int put_system_obj_data(void *ctx, rgw_raw_obj& obj, bufferlist& bl, off_t ofs, bool exclusive);
real_time set_mtime) override;
int put_system_obj_data(void *ctx, rgw_raw_obj& obj, bufferlist& bl, off_t ofs, bool exclusive) override;

int get_system_obj(RGWObjectCtx& obj_ctx, RGWRados::SystemObject::Read::GetObjState& read_state,
RGWObjVersionTracker *objv_tracker, rgw_raw_obj& obj,
bufferlist& bl, off_t ofs, off_t end,
map<string, bufferlist> *attrs,
rgw_cache_entry_info *cache_info);
rgw_cache_entry_info *cache_info) override;

int raw_obj_stat(rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch, map<string, bufferlist> *attrs,
bufferlist *first_chunk, RGWObjVersionTracker *objv_tracker);
bufferlist *first_chunk, RGWObjVersionTracker *objv_tracker) override;

int delete_system_obj(rgw_raw_obj& obj, RGWObjVersionTracker *objv_tracker);
int delete_system_obj(rgw_raw_obj& obj, RGWObjVersionTracker *objv_tracker) override;

bool chain_cache_entry(list<rgw_cache_entry_info *>& cache_info_entries, RGWChainedCache::Entry *chained_entry) {
bool chain_cache_entry(list<rgw_cache_entry_info *>& cache_info_entries, RGWChainedCache::Entry *chained_entry) override {
return cache.chain_cache_entry(cache_info_entries, chained_entry);
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_civetweb.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RGWCivetWeb : public rgw::io::RestfulClient,
size_t dump_date_header();

public:
void init_env(CephContext *cct);
void init_env(CephContext *cct) override;

size_t send_status(int status, const char *status_name) override;
size_t send_100_continue() override;
Expand Down
4 changes: 2 additions & 2 deletions src/rgw/rgw_client_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ class RGWRestfulIO : public rgw::io::AccountingFilter<rgw::io::RestfulClient*> {
SHA256 *sha256_hash;

public:
virtual ~RGWRestfulIO() {}
~RGWRestfulIO() override {}

RGWRestfulIO(rgw::io::RestfulClient* engine)
: AccountingFilter<rgw::io::RestfulClient*>(std::move(engine)),
Expand Down Expand Up @@ -374,7 +374,7 @@ class RGWClientIOStreamBuf : public std::streambuf {
setg(nullptr, nullptr, nullptr);
}

std::streambuf::int_type underflow() {
std::streambuf::int_type underflow() override {
if (gptr() < egptr()) {
return traits_type::to_int_type(*gptr());
}
Expand Down
10 changes: 5 additions & 5 deletions src/rgw/rgw_compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class RGWGetObj_Decompress : public RGWGetObj_Filter
RGWCompressionInfo* cs_info_,
bool partial_content_,
RGWGetDataCB* next);
virtual ~RGWGetObj_Decompress() {}
~RGWGetObj_Decompress() override {}

virtual int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) override;
virtual void fixup_range(off_t& ofs, off_t& end) override;
int handle_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) override;
void fixup_range(off_t& ofs, off_t& end) override;

};

Expand All @@ -42,8 +42,8 @@ class RGWPutObj_Compress : public RGWPutObj_Filter
RGWPutObj_Compress(CephContext* cct_, CompressorRef compressor,
RGWPutObjDataProcessor* next)
: RGWPutObj_Filter(next), cct(cct_), compressor(compressor) {}
virtual ~RGWPutObj_Compress(){}
virtual int handle_data(bufferlist& bl, off_t ofs, void **phandle, rgw_raw_obj *pobj, bool *again) override;
~RGWPutObj_Compress() override{}
int handle_data(bufferlist& bl, off_t ofs, void **phandle, rgw_raw_obj *pobj, bool *again) override;

bool is_compressed() { return compressed; }
vector<compression_block>& get_compression_blocks() { return blocks; }
Expand Down
16 changes: 8 additions & 8 deletions src/rgw/rgw_coroutine.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class RGWCompletionManager : public RefCountedObject {
void _complete(RGWAioCompletionNotifier *cn, void *user_info);
public:
RGWCompletionManager(CephContext *_cct);
~RGWCompletionManager();
~RGWCompletionManager() override;

void complete(RGWAioCompletionNotifier *cn, void *user_info);
int get_next(void **user_info);
Expand Down Expand Up @@ -78,7 +78,7 @@ class RGWAioCompletionNotifier : public RefCountedObject {

public:
RGWAioCompletionNotifier(RGWCompletionManager *_mgr, void *_user_data);
~RGWAioCompletionNotifier() {
~RGWAioCompletionNotifier() override {
c->release();
lock.Lock();
bool need_unregister = registered;
Expand Down Expand Up @@ -235,7 +235,7 @@ class RGWCoroutine : public RefCountedObject, public boost::asio::coroutine {

public:
RGWCoroutine(CephContext *_cct) : status(_cct), _yield_ret(false), cct(_cct), stack(NULL), retcode(0), state(RGWCoroutine_Run) {}
virtual ~RGWCoroutine();
~RGWCoroutine() override;

virtual int operate() = 0;

Expand Down Expand Up @@ -371,7 +371,7 @@ class RGWCoroutinesStack : public RefCountedObject {
bool collect_next(RGWCoroutine *op, int *ret, RGWCoroutinesStack **collected_stack); /* returns true if found a stack to collect */
public:
RGWCoroutinesStack(CephContext *_cct, RGWCoroutinesManager *_ops_mgr, RGWCoroutine *start = NULL);
~RGWCoroutinesStack();
~RGWCoroutinesStack() override;

int operate(RGWCoroutinesEnv *env);

Expand Down Expand Up @@ -492,14 +492,14 @@ class RGWCoroutinesManagerRegistry : public RefCountedObject, public AdminSocket

public:
RGWCoroutinesManagerRegistry(CephContext *_cct) : cct(_cct), lock("RGWCoroutinesRegistry::lock") {}
~RGWCoroutinesManagerRegistry();
~RGWCoroutinesManagerRegistry() override;

void add(RGWCoroutinesManager *mgr);
void remove(RGWCoroutinesManager *mgr);

int hook_to_admin_command(const string& command);
bool call(std::string command, cmdmap_t& cmdmap, std::string format,
bufferlist& out);
bufferlist& out) override;

void dump(Formatter *f) const;
};
Expand Down Expand Up @@ -562,7 +562,7 @@ class RGWCoroutinesManager {
class RGWSimpleCoroutine : public RGWCoroutine {
bool called_cleanup;

int operate();
int operate() override;

int state_init();
int state_send_request();
Expand All @@ -573,7 +573,7 @@ class RGWSimpleCoroutine : public RGWCoroutine {

public:
RGWSimpleCoroutine(CephContext *_cct) : RGWCoroutine(_cct), called_cleanup(false) {}
~RGWSimpleCoroutine();
~RGWSimpleCoroutine() override;

virtual int init() { return 0; }
virtual int send_request() = 0;
Expand Down
Loading