From: Craig Topper Date: Sat, 1 Apr 2017 21:50:10 +0000 (+0000) Subject: [APInt] Use conditional operator to simplify some code. NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=548688adbde4f76a7ad891c68f81cab7950b978b;p=llvm [APInt] Use conditional operator to simplify some code. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299320 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index f4190eb805d..e34d0f34674 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -2819,10 +2819,7 @@ int APInt::tcCompare(const integerPart *lhs, const integerPart *rhs, if (lhs[parts] == rhs[parts]) continue; - if (lhs[parts] > rhs[parts]) - return 1; - else - return -1; + return (lhs[parts] > rhs[parts]) ? 1 : -1; } return 0;