]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_rados.cc: use empty() instead of checking for size() > 0 cuttlefish 61576/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 12 Jul 2013 10:08:52 +0000 (12:08 +0200)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 28 Jan 2014 17:40:18 +0000 (09:40 -0800)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 22e0dbbd0e6b6a0fc3b49018d0a5d91ce54aca1b)

src/rgw/rgw_rados.cc

index 39db566f995346fc36f654dbb78845caca505780..f06a4e1b33298182e41679bbe5ffe7df30a9207e 100644 (file)
@@ -2669,8 +2669,7 @@ int RGWRados::get_obj(void *ctx, void **handle, rgw_obj& obj,
   else
     len = end - ofs + 1;
 
-  if (astate->has_manifest &&
-      astate->manifest.objs.size() > 0) {
+  if (astate->has_manifest && !astate->manifest.objs.empty()) {
     /* now get the relevant object part */
     map<uint64_t, RGWObjManifestPart>::iterator iter = astate->manifest.objs.upper_bound(ofs);
     /* we're now pointing at the next part (unless the first part starts at a higher ofs),