summaryrefslogtreecommitdiff
path: root/src/jit/compiler.hpp
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/compiler.hpp
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/compiler.hpp')
-rw-r--r--src/jit/compiler.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jit/compiler.hpp b/src/jit/compiler.hpp
index c129d3fea9..bb3fa30151 100644
--- a/src/jit/compiler.hpp
+++ b/src/jit/compiler.hpp
@@ -569,7 +569,7 @@ extern const BYTE genTypeSizes[TYP_COUNT];
template <class T>
inline unsigned genTypeSize(T type)
{
- assert((unsigned)TypeGet(type) < sizeof(genTypeSizes) / sizeof(genTypeSizes[0]));
+ assert((unsigned)TypeGet(type) < _countof(genTypeSizes));
return genTypeSizes[TypeGet(type)];
}
@@ -584,7 +584,7 @@ extern const BYTE genTypeStSzs[TYP_COUNT];
inline unsigned genTypeStSz(var_types type)
{
- assert((unsigned)type < sizeof(genTypeStSzs) / sizeof(genTypeStSzs[0]));
+ assert((unsigned)type < _countof(genTypeStSzs));
return genTypeStSzs[type];
}