summaryrefslogtreecommitdiff
path: root/src/jit/gentree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/gentree.cpp')
-rw-r--r--src/jit/gentree.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jit/gentree.cpp b/src/jit/gentree.cpp
index 8d9a1e9e2a..a07fe34d88 100644
--- a/src/jit/gentree.cpp
+++ b/src/jit/gentree.cpp
@@ -221,7 +221,7 @@ static const char* opNames[] = {
const char* GenTree::OpName(genTreeOps op)
{
- assert((unsigned)op < sizeof(opNames) / sizeof(opNames[0]));
+ assert((unsigned)op < _countof(opNames));
return opNames[op];
}
@@ -237,7 +237,7 @@ static const char* opStructNames[] = {
const char* GenTree::OpStructName(genTreeOps op)
{
- assert((unsigned)op < sizeof(opStructNames) / sizeof(opStructNames[0]));
+ assert((unsigned)op < _countof(opStructNames));
return opStructNames[op];
}
@@ -10660,7 +10660,7 @@ int Compiler::gtGetLclVarName(unsigned lclNum, char* buf, unsigned buf_remaining
char* Compiler::gtGetLclVarName(unsigned lclNum)
{
char buf[BUF_SIZE];
- int charsPrinted = gtGetLclVarName(lclNum, buf, sizeof(buf) / sizeof(buf[0]));
+ int charsPrinted = gtGetLclVarName(lclNum, buf, _countof(buf));
if (charsPrinted < 0)
{
return nullptr;
@@ -10675,7 +10675,7 @@ char* Compiler::gtGetLclVarName(unsigned lclNum)
void Compiler::gtDispLclVar(unsigned lclNum, bool padForBiggestDisp)
{
char buf[BUF_SIZE];
- int charsPrinted = gtGetLclVarName(lclNum, buf, sizeof(buf) / sizeof(buf[0]));
+ int charsPrinted = gtGetLclVarName(lclNum, buf, _countof(buf));
if (charsPrinted < 0)
{