From 06f18c163ec843f1fc852f078f539e1821644506 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Wed, 26 Jul 2017 08:16:11 -0400 Subject: [PATCH] rgw: rgw_website.h doesn't assume inclusion of the std namespace anymore. Signed-off-by: Radoslaw Zarzynski --- src/rgw/rgw_website.h | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/rgw/rgw_website.h b/src/rgw/rgw_website.h index fd0257b9869..4d20787fc2e 100644 --- a/src/rgw/rgw_website.h +++ b/src/rgw/rgw_website.h @@ -15,12 +15,15 @@ #ifndef RGW_WEBSITE_H #define RGW_WEBSITE_H +#include +#include + #include "rgw_xml.h" struct RGWRedirectInfo { - string protocol; - string hostname; + std::string protocol; + std::string hostname; uint16_t http_redirect_code = 0; void encode(bufferlist& bl) const { @@ -47,8 +50,8 @@ WRITE_CLASS_ENCODER(RGWRedirectInfo) struct RGWBWRedirectInfo { RGWRedirectInfo redirect; - string replace_key_prefix_with; - string replace_key_with; + std::string replace_key_prefix_with; + std::string replace_key_with; void encode(bufferlist& bl) const { ENCODE_START(1, 1, bl); @@ -74,7 +77,7 @@ WRITE_CLASS_ENCODER(RGWBWRedirectInfo) struct RGWBWRoutingRuleCondition { - string key_prefix_equals; + std::string key_prefix_equals; uint16_t http_error_code_returned_equals; void encode(bufferlist& bl) const { @@ -95,7 +98,7 @@ struct RGWBWRoutingRuleCondition void decode_json(JSONObj *obj); void decode_xml(XMLObj *obj); - bool check_key_condition(const string& key); + bool check_key_condition(const std::string& key); bool check_error_code_condition(const int error_code) { return (uint16_t)error_code == http_error_code_returned_equals; } @@ -125,20 +128,24 @@ struct RGWBWRoutingRule void decode_json(JSONObj *obj); void decode_xml(XMLObj *obj); - bool check_key_condition(const string& key) { + bool check_key_condition(const std::string& key) { return condition.check_key_condition(key); } bool check_error_code_condition(int error_code) { return condition.check_error_code_condition(error_code); } - void apply_rule(const string& default_protocol, const string& default_hostname, const string& key, string *redirect, int *redirect_code); + void apply_rule(const std::string& default_protocol, + const std::string& default_hostname, + const std::string& key, + std::string *redirect, + int *redirect_code); }; WRITE_CLASS_ENCODER(RGWBWRoutingRule) struct RGWBWRoutingRules { - list rules; + std::list rules; void encode(bufferlist& bl) const { ENCODE_START(1, 1, bl); @@ -155,9 +162,11 @@ struct RGWBWRoutingRules void dump_xml(Formatter *f) const; void decode_json(JSONObj *obj); - bool check_key_condition(const string& key, RGWBWRoutingRule **rule); + bool check_key_condition(const std::string& key, RGWBWRoutingRule **rule); bool check_error_code_condition(int error_code, RGWBWRoutingRule **rule); - bool check_key_and_error_code_condition(const string& key, const int error_code, RGWBWRoutingRule **rule); + bool check_key_and_error_code_condition(const std::string& key, + const int error_code, + RGWBWRoutingRule **rule); }; WRITE_CLASS_ENCODER(RGWBWRoutingRules)