summaryrefslogtreecommitdiff
path: root/src/jit/assertionprop.cpp
diff options
context:
space:
mode:
authorEgor Chesakov <Egor.Chesakov@microsoft.com>2017-12-12 06:31:00 -0800
committerJan Kotas <jkotas@microsoft.com>2017-12-12 09:31:00 -0500
commit82a96afda22c869b67058971a403c87ab51de2c1 (patch)
treec8673fbe42da8629966b8911ef4fff620ee10438 /src/jit/assertionprop.cpp
parent739b71daf0249526ff359d5809c48e2ce38a07ac (diff)
downloadcoreclr-82a96afda22c869b67058971a403c87ab51de2c1.tar.gz
coreclr-82a96afda22c869b67058971a403c87ab51de2c1.tar.bz2
coreclr-82a96afda22c869b67058971a403c87ab51de2c1.zip
Use macro _countof instead of explicit sizeof(arr) / sizeof(arr[0]) or sizeof(arr) / sizeof(*arr) in clrjit. (#15474)
Diffstat (limited to 'src/jit/assertionprop.cpp')
-rw-r--r--src/jit/assertionprop.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jit/assertionprop.cpp b/src/jit/assertionprop.cpp
index 912ec07fb1..b0d54b7709 100644
--- a/src/jit/assertionprop.cpp
+++ b/src/jit/assertionprop.cpp
@@ -542,7 +542,7 @@ void Compiler::optAssertionInit(bool isLocalProp)
// Note this tracks at most only 256 assertions.
static const AssertionIndex countFunc[] = {64, 128, 256, 64};
static const unsigned lowerBound = 0;
- static const unsigned upperBound = sizeof(countFunc) / sizeof(countFunc[0]) - 1;
+ static const unsigned upperBound = _countof(countFunc) - 1;
const unsigned codeSize = info.compILCodeSize / 512;
optMaxAssertionCount = countFunc[isLocalProp ? lowerBound : min(upperBound, codeSize)];