[llvm] r302407 - [APInt] Use std::min instead of writing the same thing with the ternary operator. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun May 7 23:34:40 PDT 2017
Author: ctopper
Date: Mon May 8 01:34:39 2017
New Revision: 302407
URL: http://llvm.org/viewvc/llvm-project?rev=302407&view=rev
Log:
[APInt] Use std::min instead of writing the same thing with the ternary operator. NFC
Modified:
llvm/trunk/lib/Support/APInt.cpp
Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=302407&r1=302406&r2=302407&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Mon May 8 01:34:39 2017
@@ -2252,7 +2252,7 @@ int APInt::tcMultiplyPart(WordType *dst,
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++) {
More information about the llvm-commits
mailing list