From: Danny Al-Gaaf Date: Fri, 15 Mar 2013 11:31:13 +0000 (+0100) Subject: rgw/rgw_acl_s3.cc: prefer prefix ++operator for iterators X-Git-Tag: v0.60~45^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c4cc2e80fc5838a7bac7d8fc29b5ebced6c7929d;p=ceph.git rgw/rgw_acl_s3.cc: prefer prefix ++operator for iterators Prefer prefix ++operator for iterators, move some iterator declaration into the for-loop header, since the iterator is only used within the loops. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_acl_s3.cc b/src/rgw/rgw_acl_s3.cc index 79cf2ced233..4f26dda7d20 100644 --- a/src/rgw/rgw_acl_s3.cc +++ b/src/rgw/rgw_acl_s3.cc @@ -328,8 +328,7 @@ static int parse_acl_header(RGWRados *store, RGWEnv *env, hacl_str = hacl; get_str_list(hacl_str, ",", grantees); - list::iterator it = grantees.begin(); - for (; it != grantees.end(); it++) { + for (list::iterator it = grantees.begin(); it != grantees.end(); ++it) { ACLGrant grant; int ret = parse_grantee_str(store, *it, perm, grant); if (ret < 0) @@ -395,8 +394,7 @@ int RGWAccessControlList_S3::create_from_grants(std::list& grants) acl_user_map.clear(); grant_map.clear(); - std::list::iterator it = grants.begin(); - for (; it != grants.end(); it++) { + for (std::list::iterator it = grants.begin(); it != grants.end(); ++it) { ACLGrant g = *it; add_grant(&g); }