OSDN Git Service

[APInt] Use std::min instead of writing the same thing with the ternary operator...
authorCraig Topper <craig.topper@gmail.com>
Mon, 8 May 2017 06:34:39 +0000 (06:34 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 8 May 2017 06:34:39 +0000 (06:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302407 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/APInt.cpp

index 68a3d8d..4a136f7 100644 (file)
@@ -2252,7 +2252,7 @@ int APInt::tcMultiplyPart(WordType *dst, const WordType *src,
   assert(dstParts <= srcParts + 1);
 
   /* N loops; minimum of dstParts and srcParts.  */
-  unsigned n = dstParts < srcParts ? dstParts: srcParts;
+  unsigned n = std::min(dstParts, srcParts);
 
   unsigned i;
   for (i = 0; i < n; i++) {