From: Matt Benjamin Date: Thu, 29 May 2014 14:49:52 +0000 (-0400) Subject: Remove some not-resolving make_pair() invocations. X-Git-Tag: v0.84~119^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=79e3761822d22ce882a133c065baff84d1eea5f7;p=ceph.git Remove some not-resolving make_pair() invocations. There's nothing wrong with make_pair(), but there is some type resolution issue in these instances, at least with GCC 4.8. Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 0290a9dd3e2a..c2057cde7b1a 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -1104,7 +1104,7 @@ int main(int argc, const char **argv) configs.push_back(config); string framework = config->get_framework(); - fe_map.insert(make_pair(framework, config)); + fe_map.insert(pair(framework, config)); } list fes; diff --git a/src/rgw/rgw_rest_client.cc b/src/rgw/rgw_rest_client.cc index 256db77aba77..3b8a58d49bb6 100644 --- a/src/rgw/rgw_rest_client.cc +++ b/src/rgw/rgw_rest_client.cc @@ -89,7 +89,7 @@ int RGWRESTSimpleRequest::execute(RGWAccessKey& key, const char *method, const c string date_str; get_new_date_str(cct, date_str); - headers.push_back(make_pair("HTTP_DATE", date_str)); + headers.push_back(pair("HTTP_DATE", date_str)); string canonical_header; map meta_map; @@ -108,7 +108,7 @@ int RGWRESTSimpleRequest::execute(RGWAccessKey& key, const char *method, const c ldout(cct, 15) << "generated auth header: " << auth_hdr << dendl; - headers.push_back(make_pair("AUTHORIZATION", auth_hdr)); + headers.push_back(pair("AUTHORIZATION", auth_hdr)); int r = process(method, new_url.c_str()); if (r < 0) return r; @@ -221,12 +221,12 @@ int RGWRESTSimpleRequest::forward_request(RGWAccessKey& key, req_info& info, siz map& m = new_env.get_map(); map::iterator iter; for (iter = m.begin(); iter != m.end(); ++iter) { - headers.push_back(make_pair(iter->first, iter->second)); + headers.push_back(pair(iter->first, iter->second)); } map& meta_map = new_info.x_meta_map; for (iter = meta_map.begin(); iter != meta_map.end(); ++iter) { - headers.push_back(make_pair(iter->first, iter->second)); + headers.push_back(pair(iter->first, iter->second)); } string params_str; @@ -446,7 +446,7 @@ int RGWRESTStreamWriteRequest::put_obj_init(RGWAccessKey& key, rgw_obj& obj, uin map::iterator iter; for (iter = m.begin(); iter != m.end(); ++iter) { - headers.push_back(make_pair(iter->first, iter->second)); + headers.push_back(pair(iter->first, iter->second)); } cb = new RGWRESTStreamOutCB(this); @@ -585,7 +585,7 @@ int RGWRESTStreamReadRequest::get_obj(RGWAccessKey& key, map& ex map& m = new_env.get_map(); map::iterator iter; for (iter = m.begin(); iter != m.end(); ++iter) { - headers.push_back(make_pair(iter->first, iter->second)); + headers.push_back(pair(iter->first, iter->second)); } int r = process(new_info.method, new_url.c_str()); diff --git a/src/rgw/rgw_rest_conn.cc b/src/rgw/rgw_rest_conn.cc index 32bf0eaacd39..a02c32453209 100644 --- a/src/rgw/rgw_rest_conn.cc +++ b/src/rgw/rgw_rest_conn.cc @@ -34,13 +34,13 @@ int RGWRESTConn::forward(const string& uid, req_info& info, obj_version *objv, s if (ret < 0) return ret; list > params; - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "uid", uid)); - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "region", region)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "uid", uid)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "region", region)); if (objv) { - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "tag", objv->tag)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "tag", objv->tag)); char buf[16]; snprintf(buf, sizeof(buf), "%lld", (long long)objv->ver); - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "ver", buf)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "ver", buf)); } RGWRESTSimpleRequest req(cct, url, NULL, ¶ms); return req.forward_request(key, info, max_response, inbl, outbl); @@ -61,8 +61,8 @@ int RGWRESTConn::put_obj_init(const string& uid, rgw_obj& obj, uint64_t obj_size return ret; list > params; - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "uid", uid)); - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "region", region)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "uid", uid)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "region", region)); *req = new RGWRESTStreamWriteRequest(cct, url, NULL, ¶ms); return (*req)->put_obj_init(key, obj, obj_size, attrs); } @@ -84,10 +84,10 @@ int RGWRESTConn::get_obj(const string& uid, req_info *info /* optional */, rgw_o return ret; list > params; - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "uid", uid)); - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "region", region)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "uid", uid)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "region", region)); if (prepend_metadata) { - params.push_back(make_pair(RGW_SYS_PARAM_PREFIX "prepend-metadata", region)); + params.push_back(pair(RGW_SYS_PARAM_PREFIX "prepend-metadata", region)); } *req = new RGWRESTStreamReadRequest(cct, url, cb, NULL, ¶ms); map extra_headers;