Skip to content

Commit e52b789

Browse files
committed
Use named constant instead of 0 (no functional change).
1 parent 1f7b9aa commit e52b789

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/liboslcomp/typecheck.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,26 +1017,26 @@ class CandidateFunctions {
10171017
++fargs;
10181018
case '\0':
10191019
if (fargs < m_nargs)
1020-
return 0;
1020+
return kNoMatch;
10211021
break;
10221022

10231023
default:
10241024
// TODO: Scoring default function arguments would go here
10251025
// Curently an unused formal argument, so no match at all.
1026-
return 0;
1026+
return kNoMatch;
10271027
}
10281028
ASSERT (*formals == 0);
10291029

10301030
int highscore = m_candidates.empty() ? 0 : m_candidates.front().ascore;
10311031
if (argscore < highscore)
1032-
return 0;
1032+
return kNoMatch;
10331033

10341034

10351035
if (argscore == highscore) {
10361036
// Check for duplicate declarations
10371037
for (auto& candidate : m_candidates) {
10381038
if (candidate.sym->argcodes() == func->argcodes())
1039-
return 0;
1039+
return kNoMatch;
10401040
}
10411041
} else // clear any prior ambiguous matches
10421042
m_candidates.clear();

0 commit comments

Comments
 (0)