From: Casey Bodley Date: Mon, 12 Oct 2015 17:14:59 +0000 (-0400) Subject: rgw: RGWRestConn uses vector instead of map X-Git-Tag: v10.1.0~354^2~244 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=384df8d12b62426aea7a2fcaa19e85ae752f22e3;p=ceph.git rgw: RGWRestConn uses vector instead of map Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rest_conn.cc b/src/rgw/rgw_rest_conn.cc index e555ca3935e0..a08a049198f1 100644 --- a/src/rgw/rgw_rest_conn.cc +++ b/src/rgw/rgw_rest_conn.cc @@ -6,13 +6,11 @@ #define dout_subsys ceph_subsys_rgw -RGWRESTConn::RGWRESTConn(CephContext *_cct, RGWRados *store, const list& remote_endpoints) : cct(_cct) +RGWRESTConn::RGWRESTConn(CephContext *_cct, RGWRados *store, + const list& remote_endpoints) + : cct(_cct), + endpoints(remote_endpoints.begin(), remote_endpoints.end()) { - list::const_iterator iter; - int i; - for (i = 0, iter = remote_endpoints.begin(); iter != remote_endpoints.end(); ++iter, ++i) { - endpoints[i] = *iter; - } key = store->get_zone_params().system_key; zone_group = store->get_zonegroup().get_id(); } diff --git a/src/rgw/rgw_rest_conn.h b/src/rgw/rgw_rest_conn.h index d2ecf230a7e8..c5ca9cb60e2d 100644 --- a/src/rgw/rgw_rest_conn.h +++ b/src/rgw/rgw_rest_conn.h @@ -39,7 +39,7 @@ struct rgw_http_param_pair { class RGWRESTConn { CephContext *cct; - map endpoints; + vector endpoints; RGWAccessKey key; string zone_group; atomic_t counter;