]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Exceptions should be caught by const reference
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 8 May 2018 23:23:02 +0000 (19:23 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 18 May 2018 13:30:35 +0000 (15:30 +0200)
/Not/ by value.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 1065d7996e359283f0f3e3804cdb77b4829a9191)

src/rgw/rgw_acl_swift.cc

index de489444852d506640ffde5c268543722f433d66..18a999127470152793b222e12b1fc9239218feab 100644 (file)
@@ -106,7 +106,7 @@ static boost::optional<ACLGrant> referrer_to_grant(std::string url_spec,
 
     grant.set_referer(url_spec, is_negative ? 0 : perm);
     return grant;
-  } catch (std::out_of_range) {
+  } catch (const std::out_of_range&) {
     return boost::none;
   }
 }