From b7015d50a61c7a4a014201b4a93561882dbea617 Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Thu, 14 Nov 2019 18:25:35 -0500 Subject: [PATCH] rgw: add const correctness to some rest functions Also, clean up some namespace declarations. Also, convert to using `#pragma once`. Signed-off-by: J. Eric Ivancich --- src/rgw/rgw_auth_s3.cc | 8 +--- src/rgw/rgw_cr_rest.h | 5 +-- src/rgw/rgw_rest.h | 11 ++---- src/rgw/rgw_rest_admin.h | 6 +-- src/rgw/rgw_rest_bucket.h | 5 +-- src/rgw/rgw_rest_client.h | 6 +-- src/rgw/rgw_rest_config.h | 5 +-- src/rgw/rgw_rest_conn.h | 7 +--- src/rgw/rgw_rest_iam.h | 6 +-- src/rgw/rgw_rest_log.h | 5 +-- src/rgw/rgw_rest_metadata.h | 5 +-- src/rgw/rgw_rest_realm.h | 5 +-- src/rgw/rgw_rest_role.h | 5 +-- src/rgw/rgw_rest_s3.cc | 10 ++--- src/rgw/rgw_rest_s3.h | 54 +++++++++++---------------- src/rgw/rgw_rest_s3website.h | 5 +-- src/rgw/rgw_rest_sts.cc | 8 +--- src/rgw/rgw_rest_sts.h | 14 ++----- src/rgw/rgw_rest_swift.cc | 2 +- src/rgw/rgw_rest_swift.h | 13 +++---- src/rgw/rgw_rest_usage.h | 5 +-- src/rgw/rgw_rest_user.h | 5 +-- src/rgw/rgw_rest_user_policy.h | 6 +-- src/rgw/rgw_sync_module_es_rest.h | 5 +-- src/rgw/rgw_sync_module_pubsub_rest.h | 5 +-- 25 files changed, 58 insertions(+), 153 deletions(-) diff --git a/src/rgw/rgw_auth_s3.cc b/src/rgw/rgw_auth_s3.cc index 25fc091a854..1f8050da720 100644 --- a/src/rgw/rgw_auth_s3.cc +++ b/src/rgw/rgw_auth_s3.cc @@ -238,9 +238,7 @@ bool rgw_create_s3_canonical_header(const req_info& info, } -namespace rgw { -namespace auth { -namespace s3 { +namespace rgw::auth::s3 { bool is_time_skew_ok(time_t t) { @@ -1130,6 +1128,4 @@ AWSv4ComplSingle::create(const req_state* const s, return std::make_shared(s); } -} /* namespace s3 */ -} /* namespace auth */ -} /* namespace rgw */ +} // namespace rgw::auth::s3 diff --git a/src/rgw/rgw_cr_rest.h b/src/rgw/rgw_cr_rest.h index e648dfac84e..0776c4284f6 100644 --- a/src/rgw/rgw_cr_rest.h +++ b/src/rgw/rgw_cr_rest.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_CR_REST_H -#define CEPH_RGW_CR_REST_H +#pragma once #include #include @@ -589,5 +588,3 @@ public: int operate() override; }; - -#endif diff --git a/src/rgw/rgw_rest.h b/src/rgw/rgw_rest.h index 64d438818f5..455c4100ac4 100644 --- a/src/rgw/rgw_rest.h +++ b/src/rgw/rgw_rest.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_H -#define CEPH_RGW_REST_H +#pragma once #define TIME_BUF_SIZE 128 @@ -544,7 +543,7 @@ public: class RGWHandler_REST : public RGWHandler { protected: - virtual bool is_obj_update_op() { return false; } + virtual bool is_obj_update_op() const { return false; } virtual RGWOp *op_get() { return NULL; } virtual RGWOp *op_put() { return NULL; } virtual RGWOp *op_delete() { return NULL; } @@ -578,12 +577,10 @@ class RGWHandler_REST_SWIFT; class RGWHandler_SWIFT_Auth; class RGWHandler_REST_S3; -namespace rgw { -namespace auth { +namespace rgw::auth { class StrategyRegistry; -} } class RGWRESTMgr { @@ -824,5 +821,3 @@ extern int dump_body(struct req_state* s, const char* buf, size_t len); extern int dump_body(struct req_state* s, /* const */ ceph::buffer::list& bl); extern int dump_body(struct req_state* s, const std::string& str); extern int recv_body(struct req_state* s, char* buf, size_t max); - -#endif /* CEPH_RGW_REST_H */ diff --git a/src/rgw/rgw_rest_admin.h b/src/rgw/rgw_rest_admin.h index 131a70fef64..0a8ad83c013 100644 --- a/src/rgw/rgw_rest_admin.h +++ b/src/rgw/rgw_rest_admin.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_ADMIN_H -#define CEPH_RGW_REST_ADMIN_H +#pragma once class RGWRESTMgr_Admin : public RGWRESTMgr { @@ -10,6 +9,3 @@ public: RGWRESTMgr_Admin() {} ~RGWRESTMgr_Admin() override {} }; - - -#endif diff --git a/src/rgw/rgw_rest_bucket.h b/src/rgw/rgw_rest_bucket.h index d85573cc2af..d516ea5c54a 100644 --- a/src/rgw/rgw_rest_bucket.h +++ b/src/rgw/rgw_rest_bucket.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_BUCKET_H -#define CEPH_RGW_REST_BUCKET_H +#pragma once #include "rgw_rest.h" #include "rgw_rest_s3.h" @@ -34,5 +33,3 @@ public: return new RGWHandler_Bucket(auth_registry); } }; - -#endif diff --git a/src/rgw/rgw_rest_client.h b/src/rgw/rgw_rest_client.h index e0e26b02760..1e11e3ae2ae 100644 --- a/src/rgw/rgw_rest_client.h +++ b/src/rgw/rgw_rest_client.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_CLIENT_H -#define CEPH_RGW_REST_CLIENT_H +#pragma once #include "rgw_http_client.h" @@ -222,6 +221,3 @@ public: RGWGetDataCB *get_out_cb() { return out_cb; } }; - -#endif - diff --git a/src/rgw/rgw_rest_config.h b/src/rgw/rgw_rest_config.h index 630e60101b5..b2ce58d7e41 100644 --- a/src/rgw/rgw_rest_config.h +++ b/src/rgw/rgw_rest_config.h @@ -13,8 +13,7 @@ * */ -#ifndef RGW_REST_CONFIG_H -#define RGW_REST_CONFIG_H +#pragma once #include "rgw_zone.h" @@ -84,5 +83,3 @@ public: return new RGWHandler_Config(auth_registry); } }; - -#endif /* RGW_REST_CONFIG_H */ diff --git a/src/rgw/rgw_rest_conn.h b/src/rgw/rgw_rest_conn.h index fd6b20845f0..0ea3827d38f 100644 --- a/src/rgw/rgw_rest_conn.h +++ b/src/rgw/rgw_rest_conn.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_CONN_H -#define CEPH_RGW_REST_CONN_H +#pragma once #include "rgw_rados.h" #include "rgw_rest_client.h" @@ -515,7 +514,3 @@ public: params, extra_headers, _mgr) {} }; - - - -#endif diff --git a/src/rgw/rgw_rest_iam.h b/src/rgw/rgw_rest_iam.h index 0179bd13d50..30e0304c37a 100644 --- a/src/rgw/rgw_rest_iam.h +++ b/src/rgw/rgw_rest_iam.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_IAM_H -#define CEPH_RGW_REST_IAM_H +#pragma once #include "rgw_auth.h" #include "rgw_auth_filters.h" @@ -44,6 +43,3 @@ public: const rgw::auth::StrategyRegistry&, const std::string&) override; }; - -#endif /* CEPH_RGW_REST_STS_H */ - diff --git a/src/rgw/rgw_rest_log.h b/src/rgw/rgw_rest_log.h index 56191ad7ba6..9e11b603121 100644 --- a/src/rgw/rgw_rest_log.h +++ b/src/rgw/rgw_rest_log.h @@ -13,8 +13,7 @@ * */ -#ifndef RGW_REST_LOG_H -#define RGW_REST_LOG_H +#pragma once #include "rgw_metadata.h" #include "rgw_mdlog.h" @@ -305,5 +304,3 @@ public: return new RGWHandler_Log(auth_registry); } }; - -#endif /* RGW_REST_LOG_H */ diff --git a/src/rgw/rgw_rest_metadata.h b/src/rgw/rgw_rest_metadata.h index 3486ddde8ae..2e958e92af2 100644 --- a/src/rgw/rgw_rest_metadata.h +++ b/src/rgw/rgw_rest_metadata.h @@ -13,8 +13,7 @@ * */ -#ifndef RGW_REST_METADATA_H -#define RGW_REST_METADATA_H +#pragma once class RGWOp_Metadata_List : public RGWRESTOp { public: @@ -102,5 +101,3 @@ public: return new RGWHandler_Metadata(auth_registry); } }; - -#endif /* RGW_REST_METADATA_H */ diff --git a/src/rgw/rgw_rest_realm.h b/src/rgw/rgw_rest_realm.h index 1cc837e4f69..fd4401d9649 100644 --- a/src/rgw/rgw_rest_realm.h +++ b/src/rgw/rgw_rest_realm.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_REALM_H -#define CEPH_RGW_REST_REALM_H +#pragma once #include "rgw_rest.h" @@ -14,5 +13,3 @@ public: const rgw::auth::StrategyRegistry& auth_registry, const std::string&) override; }; - -#endif diff --git a/src/rgw/rgw_rest_role.h b/src/rgw/rgw_rest_role.h index 0849163b9f2..17fe72a7ea5 100644 --- a/src/rgw/rgw_rest_role.h +++ b/src/rgw/rgw_rest_role.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_ROLE_H -#define CEPH_RGW_REST_ROLE_H +#pragma once #include "rgw_role.h" @@ -127,5 +126,3 @@ public: RGWOpType get_type() override { return RGW_OP_DELETE_ROLE_POLICY; } uint64_t get_op() { return rgw::IAM::iamDeleteRolePolicy; } }; -#endif /* CEPH_RGW_REST_ROLE_H */ - diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index c0a13c54f8c..c021ae0cbba 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -3632,7 +3632,7 @@ RGWOp *RGWHandler_REST_Service_S3::op_post() return nullptr; } -RGWOp *RGWHandler_REST_Bucket_S3::get_obj_op(bool get_data) +RGWOp *RGWHandler_REST_Bucket_S3::get_obj_op(bool get_data) const { // Non-website mode if (get_data) { @@ -4433,9 +4433,7 @@ RGWOp* RGWHandler_REST_Service_S3Website::get_obj_op(bool get_data) } -namespace rgw { -namespace auth { -namespace s3 { +namespace rgw::auth::s3 { static rgw::auth::Completer::cmplptr_t null_completer_factory(const boost::optional& secret_key) @@ -4855,9 +4853,7 @@ AWSEngine::authenticate(const DoutPrefixProvider* dpp, const req_state* const s) } } -} /* namespace s3 */ -} /* namespace auth */ -} /* namespace rgw */ +} // namespace rgw::auth::s3 rgw::LDAPHelper* rgw::auth::s3::LDAPEngine::ldh = nullptr; std::mutex rgw::auth::s3::LDAPEngine::mtx; diff --git a/src/rgw/rgw_rest_s3.h b/src/rgw/rgw_rest_s3.h index 300a4f476b3..0c0fba5274b 100644 --- a/src/rgw/rgw_rest_s3.h +++ b/src/rgw/rgw_rest_s3.h @@ -1,9 +1,8 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_S3_H +#pragma once -#define CEPH_RGW_REST_S3_H #define TIME_BUF_SIZE 128 #include @@ -604,10 +603,10 @@ public: class RGWHandler_REST_Service_S3 : public RGWHandler_REST_S3 { protected: - const bool isSTSEnabled; - const bool isIAMEnabled; - const bool isPSEnabled; - bool is_usage_op() { + const bool isSTSEnabled; + const bool isIAMEnabled; + const bool isPSEnabled; + bool is_usage_op() const { return s->info.args.exists("usage"); } RGWOp *op_get() override; @@ -623,31 +622,28 @@ public: class RGWHandler_REST_Bucket_S3 : public RGWHandler_REST_S3 { const bool enable_pubsub; protected: - bool is_acl_op() { + bool is_acl_op() const { return s->info.args.exists("acl"); } - bool is_cors_op() { + bool is_cors_op() const { return s->info.args.exists("cors"); } - bool is_lc_op() { + bool is_lc_op() const { return s->info.args.exists("lifecycle"); } - bool is_obj_update_op() override { + bool is_obj_update_op() const override { return is_acl_op() || is_cors_op(); } - - bool is_tagging_op() { + bool is_tagging_op() const { return s->info.args.exists("tagging"); } - - bool is_request_payment_op() { + bool is_request_payment_op() const { return s->info.args.exists("requestPayment"); } - bool is_policy_op() { + bool is_policy_op() const { return s->info.args.exists("policy"); } - - bool is_object_lock_op() { + bool is_object_lock_op() const { return s->info.args.exists("object-lock"); } bool is_notification_op() const { @@ -656,7 +652,8 @@ protected: } return false; } - RGWOp *get_obj_op(bool get_data); + + RGWOp *get_obj_op(bool get_data) const; RGWOp *op_get() override; RGWOp *op_head() override; @@ -672,20 +669,20 @@ public: class RGWHandler_REST_Obj_S3 : public RGWHandler_REST_S3 { protected: - bool is_acl_op() { + bool is_acl_op() const { return s->info.args.exists("acl"); } - bool is_tagging_op() { + bool is_tagging_op() const { return s->info.args.exists("tagging"); } - bool is_obj_retention_op() { + bool is_obj_retention_op() const { return s->info.args.exists("retention"); } - bool is_obj_legal_hold_op() { + bool is_obj_legal_hold_op() const { return s->info.args.exists("legal-hold"); } - bool is_obj_update_op() override { + bool is_obj_update_op() const override { return is_acl_op() || is_tagging_op() || is_obj_retention_op() || is_obj_legal_hold_op(); } RGWOp *get_obj_op(bool get_data); @@ -829,9 +826,7 @@ static inline int valid_s3_bucket_name(const string& name, bool relaxed=false) } -namespace rgw { -namespace auth { -namespace s3 { +namespace rgw::auth::s3 { class AWSEngine : public rgw::auth::Engine { public: @@ -1090,9 +1085,4 @@ public: }; -} /* namespace s3 */ -} /* namespace auth */ -} /* namespace rgw */ - - -#endif /* CEPH_RGW_REST_S3_H */ +} // namespace rgw::auth::s3 diff --git a/src/rgw/rgw_rest_s3website.h b/src/rgw/rgw_rest_s3website.h index b8a4f20b605..c2c4517bc11 100644 --- a/src/rgw/rgw_rest_s3website.h +++ b/src/rgw/rgw_rest_s3website.h @@ -13,8 +13,7 @@ * */ -#ifndef CEPH_RGW_REST_S3WEBSITE_H -#define CEPH_RGW_REST_S3WEBSITE_H +#pragma once #include "rgw_rest_s3.h" @@ -99,5 +98,3 @@ public: } } }; - -#endif diff --git a/src/rgw/rgw_rest_sts.cc b/src/rgw/rgw_rest_sts.cc index 337c605e03d..8be8669074b 100644 --- a/src/rgw/rgw_rest_sts.cc +++ b/src/rgw/rgw_rest_sts.cc @@ -37,9 +37,7 @@ #define dout_context g_ceph_context #define dout_subsys ceph_subsys_rgw -namespace rgw { -namespace auth { -namespace sts { +namespace rgw::auth::sts { bool WebTokenEngine::is_applicable(const std::string& token) const noexcept @@ -118,9 +116,7 @@ WebTokenEngine::authenticate( const DoutPrefixProvider* dpp, return result_t::deny(-EACCES); } -}; /* namespace sts */ -}; /* namespace auth */ -}; /* namespace rgw */ +} // namespace rgw::auth::s3 int RGWREST_STS::verify_permission() { diff --git a/src/rgw/rgw_rest_sts.h b/src/rgw/rgw_rest_sts.h index 14c8311b31f..bac127348eb 100644 --- a/src/rgw/rgw_rest_sts.h +++ b/src/rgw/rgw_rest_sts.h @@ -1,17 +1,14 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_STS_H -#define CEPH_RGW_REST_STS_H +#pragma once #include "rgw_auth.h" #include "rgw_auth_filters.h" #include "rgw_sts.h" #include "rgw_web_idp.h" -namespace rgw { -namespace auth { -namespace sts { +namespace rgw::auth::sts { class WebTokenEngine : public rgw::auth::Engine { CephContext* const cct; @@ -93,9 +90,7 @@ public: } }; -}; /* namespace sts */ -}; /* namespace auth */ -}; +} // namespace rgw::auth::sts class RGWREST_STS : public RGWRESTOp { protected: @@ -200,6 +195,3 @@ public: const rgw::auth::StrategyRegistry&, const std::string&) override; }; - -#endif /* CEPH_RGW_REST_STS_H */ - diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index db3b3ff5448..7d245b96a33 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -2580,7 +2580,7 @@ bool RGWSwiftWebsiteHandler::is_web_dir() const return subdir_marker == content_type && state->size <= 1; } -bool RGWSwiftWebsiteHandler::is_index_present(const std::string& index) +bool RGWSwiftWebsiteHandler::is_index_present(const std::string& index) const { rgw_obj obj(s->bucket, index); diff --git a/src/rgw/rgw_rest_swift.h b/src/rgw/rgw_rest_swift.h index 0066ef87408..98e2fb144f0 100644 --- a/src/rgw/rgw_rest_swift.h +++ b/src/rgw/rgw_rest_swift.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_SWIFT_H -#define CEPH_RGW_REST_SWIFT_H +#pragma once #define TIME_BUF_SIZE 128 #include @@ -351,7 +350,7 @@ class RGWSwiftWebsiteHandler { bool is_web_mode() const; bool can_be_website_req() const; bool is_web_dir() const; - bool is_index_present(const std::string& index); + bool is_index_present(const std::string& index) const; int serve_errordoc(int http_ret, std::string error_doc); @@ -380,7 +379,7 @@ class RGWHandler_REST_SWIFT : public RGWHandler_REST { protected: const rgw::auth::Strategy& auth_strategy; - virtual bool is_acl_op() { + virtual bool is_acl_op() const { return false; } @@ -419,7 +418,7 @@ class RGWHandler_REST_Bucket_SWIFT : public RGWHandler_REST_SWIFT { * initialization (see the init() method). */ boost::optional website_handler; protected: - bool is_obj_update_op() override { + bool is_obj_update_op() const override { return s->op == OP_POST; } @@ -455,7 +454,7 @@ class RGWHandler_REST_Obj_SWIFT : public RGWHandler_REST_SWIFT { * initialization (see the init() method). */ boost::optional website_handler; protected: - bool is_obj_update_op() override { + bool is_obj_update_op() const override { return s->op == OP_POST; } @@ -677,5 +676,3 @@ public: const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override; }; - -#endif diff --git a/src/rgw/rgw_rest_usage.h b/src/rgw/rgw_rest_usage.h index 6a57ecf3ad1..6bffad69dd4 100644 --- a/src/rgw/rgw_rest_usage.h +++ b/src/rgw/rgw_rest_usage.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_USAGE_H -#define CEPH_RGW_REST_USAGE_H +#pragma once #include "rgw_rest.h" #include "rgw_rest_s3.h" @@ -32,5 +31,3 @@ public: return new RGWHandler_Usage(auth_registry); } }; - -#endif diff --git a/src/rgw/rgw_rest_user.h b/src/rgw/rgw_rest_user.h index bfef1919ee6..06279759496 100644 --- a/src/rgw/rgw_rest_user.h +++ b/src/rgw/rgw_rest_user.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_USER_H -#define CEPH_RGW_REST_USER_H +#pragma once #include "rgw_rest.h" #include "rgw_rest_s3.h" @@ -34,5 +33,3 @@ public: return new RGWHandler_User(auth_registry); } }; - -#endif diff --git a/src/rgw/rgw_rest_user_policy.h b/src/rgw/rgw_rest_user_policy.h index baf26085bd0..d9b46b4810e 100644 --- a/src/rgw/rgw_rest_user_policy.h +++ b/src/rgw/rgw_rest_user_policy.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_REST_USER_POLICY_H -#define CEPH_RGW_REST_USER_POLICY_H +#pragma once class RGWRestUserPolicy : public RGWRESTOp { protected: @@ -71,6 +70,3 @@ public: uint64_t get_op() override; RGWOpType get_type() override { return RGW_OP_DELETE_USER_POLICY; } }; - -#endif /* CEPH_RGW_REST_USER_POLICY_H */ - diff --git a/src/rgw/rgw_sync_module_es_rest.h b/src/rgw/rgw_sync_module_es_rest.h index 10647553f95..676cbba64e5 100644 --- a/src/rgw/rgw_sync_module_es_rest.h +++ b/src/rgw/rgw_sync_module_es_rest.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_SYNC_MODULE_ES_REST_H -#define CEPH_RGW_SYNC_MODULE_ES_REST_H +#pragma once #include "rgw_rest.h" @@ -16,5 +15,3 @@ public: const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override; }; - -#endif diff --git a/src/rgw/rgw_sync_module_pubsub_rest.h b/src/rgw/rgw_sync_module_pubsub_rest.h index d95539037ce..4990dbbedd0 100644 --- a/src/rgw/rgw_sync_module_pubsub_rest.h +++ b/src/rgw/rgw_sync_module_pubsub_rest.h @@ -1,8 +1,7 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp -#ifndef CEPH_RGW_SYNC_MODULE_PUBSUB_REST_H -#define CEPH_RGW_SYNC_MODULE_PUBSUB_REST_H +#pragma once #include "rgw_rest.h" @@ -12,5 +11,3 @@ public: const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override; }; - -#endif -- 2.39.5