]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add const correctness to some rest functions 31660/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 14 Nov 2019 23:25:35 +0000 (18:25 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 15 Nov 2019 00:55:11 +0000 (19:55 -0500)
Also, clean up some namespace declarations. Also, convert to using
`#pragma once`.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
25 files changed:
src/rgw/rgw_auth_s3.cc
src/rgw/rgw_cr_rest.h
src/rgw/rgw_rest.h
src/rgw/rgw_rest_admin.h
src/rgw/rgw_rest_bucket.h
src/rgw/rgw_rest_client.h
src/rgw/rgw_rest_config.h
src/rgw/rgw_rest_conn.h
src/rgw/rgw_rest_iam.h
src/rgw/rgw_rest_log.h
src/rgw/rgw_rest_metadata.h
src/rgw/rgw_rest_realm.h
src/rgw/rgw_rest_role.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.h
src/rgw/rgw_rest_s3website.h
src/rgw/rgw_rest_sts.cc
src/rgw/rgw_rest_sts.h
src/rgw/rgw_rest_swift.cc
src/rgw/rgw_rest_swift.h
src/rgw/rgw_rest_usage.h
src/rgw/rgw_rest_user.h
src/rgw/rgw_rest_user_policy.h
src/rgw/rgw_sync_module_es_rest.h
src/rgw/rgw_sync_module_pubsub_rest.h

index 25fc091a8541823cbe39a78a558e275a1259001f..1f8050da720e51ff7557a52a2d82dd9cf0e9a68b 100644 (file)
@@ -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<AWSv4ComplSingle>(s);
 }
 
-} /* namespace s3 */
-} /* namespace auth */
-} /* namespace rgw */
+} // namespace rgw::auth::s3
index e648dfac84e5414fdf60167db9a5e499bc9d9a33..0776c4284f67df84248617caa3930d4197e62c6c 100644 (file)
@@ -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 <boost/intrusive_ptr.hpp>
 #include <mutex>
@@ -589,5 +588,3 @@ public:
 
   int operate() override;
 };
-
-#endif
index 64d438818f5e833b14f093c5a2a2b7492d6c8aa3..455c4100ac4c60607dfa5abb8434895cc36cf812 100644 (file)
@@ -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 */
index 131a70fef642e0798a46b628c47981ba4fbc606c..0a8ad83c01306ef4c41f640564f20fa06842cac8 100644 (file)
@@ -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
index d85573cc2afc1fcd7947d6d700b06ccd154c94e6..d516ea5c54aae084805dcff1e57299468afac26e 100644 (file)
@@ -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
index e0e26b02760476183de8026627d7e531d804fc13..1e11e3ae2ae1aba506dcce60dfe2a202e83c319b 100644 (file)
@@ -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
-
index 630e60101b58be31ea7d0ceb9f45bface1e2b4c4..b2ce58d7e415b851eb44040f96c217b7c26aa694 100644 (file)
@@ -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 */
index fd6b20845f010456a94b3aca181df66f80c75aa9..0ea3827d38f29f1ccda55f08aa5cbf4986aa51e0 100644 (file)
@@ -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
index 0179bd13d50e36d914090d42d7c2052bf3d6deeb..30e0304c37a02e1452af6425102247e8d0ebe166 100644 (file)
@@ -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 */
-
index 56191ad7ba6cdb1fa242c97329baa7b7a1b97a3d..9e11b603121ddc022b2950aaecb1483bc2152456 100644 (file)
@@ -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 */
index 3486ddde8ae0e22484519f48143cff62bcf19327..2e958e92af280dd7e0e7208558d265405e69093e 100644 (file)
@@ -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 */
index 1cc837e4f69b8c35bd3420b6859350dd98e15dd0..fd4401d9649d0793ccb2b8e95c07828830deefc8 100644 (file)
@@ -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
index 0849163b9f27346e3cecaf35ca30029cd47f05e3..17fe72a7ea5e3459f4508c859fd41bf6cdebf057 100644 (file)
@@ -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 */
-
index c0a13c54f8c7f4c8cc2c9b99dc4bd09f80e23d6c..c021ae0cbba67718cd3040785e0ff767eafbb797 100644 (file)
@@ -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<std::string>& 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;
index 300a4f476b3a290068f47042f1810b031defe6e8..0c0fba5274b64c3197059a28f068ce512b7d5935 100644 (file)
@@ -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 <mutex>
@@ -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
index b8a4f20b605ec182d3cb5e7316720a17d2735ebe..c2c4517bc1163b69a962d73ffeb2d825211c14b2 100644 (file)
@@ -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
index 337c605e03d5c9b029c1b073f6ab17383bc0c3af..8be8669074bf63d3c29f4fc19177e6b07c65740c 100644 (file)
@@ -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()
 {
index 14c8311b31ffd25fa963f2a5a472cfd6eff69abc..bac127348eb441f06ade73344e91d9c54a1e496f 100644 (file)
@@ -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 */
-
index db3b3ff54481db40fbb8f46b55f02d850744480a..7d245b96a336ea287fc11f60540b03656ae6f3f3 100644 (file)
@@ -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);
 
index 0066ef874087886fcdbe7a361d078a99f94b2e70..98e2fb144f0980a7eb25173aab247d1d20505d11 100644 (file)
@@ -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 <boost/optional.hpp>
@@ -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<RGWSwiftWebsiteHandler> 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<RGWSwiftWebsiteHandler> 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
index 6a57ecf3ad199d9b151ebecfd45683cb475748b5..6bffad69dd46c595eff8faf1e1bb89b79f38ef61 100644 (file)
@@ -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
index bfef1919ee69e54500061a0cdeed078fee314d45..0627975949600aae0181bc648d89836bf1f1d413 100644 (file)
@@ -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
index baf26085bd09e9091e28bfd2556725741eea140e..d9b46b4810e6604b4944fcfeb245f0dcc2a9cf37 100644 (file)
@@ -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 */
-
index 10647553f95511981d46842f1ba2e562ec7fa503..676cbba64e506b5657d5f913a2827f99080d3b50 100644 (file)
@@ -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
index d95539037ce8bfbef3b45c5e4ca9e9463740dfd3..4990dbbedd0dd66701fb183bf377e3a5732c1c06 100644 (file)
@@ -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