]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fixed > and < on object_t
authorsageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Fri, 1 Dec 2006 21:43:29 +0000 (21:43 +0000)
committersageweil <sageweil@29311d96-e01e-0410-9327-a35deaab8ce9>
Fri, 1 Dec 2006 21:43:29 +0000 (21:43 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@971 29311d96-e01e-0410-9327-a35deaab8ce9

ceph/include/object.h

index cd24bcf0cfe0433473bb6bb442c2cf9ddbf204d8..3a66c4ab83d540440a6a21a6e353c1ec2bf31299 100644 (file)
@@ -40,10 +40,20 @@ inline bool operator!=(const object_t l, const object_t r) {
   return (l.ino != r.ino) || (l.bno != r.bno) || (l.rev != r.rev);
 }
 inline bool operator>(const object_t l, const object_t r) {
-  return (l.ino > r.ino) ? true : ((l.ino == r.ino && l.bno > r.bno) ? true: ((l.rev > r.rev) ? true:false));
+  if (l.ino > r.ino) return true;
+  if (l.ino < r.ino) return false;
+  if (l.bno > r.bno) return true;
+  if (l.bno < r.bno) return false;
+  if (l.rev > r.rev) return true;
+  return false;
 }
 inline bool operator<(const object_t l, const object_t r) {
-  return (l.ino < r.ino) ? true : ((l.ino == r.ino && l.bno < r.bno) ? true: ((l.rev < r.rev) ? true:false));
+  if (l.ino < r.ino) return true;
+  if (l.ino > r.ino) return false;
+  if (l.bno < r.bno) return true;
+  if (l.bno > r.bno) return false;
+  if (l.rev < r.rev) return true;
+  return false;
 }
 inline bool operator>=(const object_t l, const object_t r) { 
   return !(l < r);