1
0
mirror of https://github.com/cc65/cc65.git synced 2025-08-13 08:25:28 +00:00

Changed 'switch' to 'if' according PR review comments.

This commit is contained in:
acqn
2020-08-02 13:24:46 +08:00
committed by Oliver Schmidt
parent 30fd8592ae
commit 2a555d198c

View File

@@ -755,14 +755,11 @@ unsigned TypeOf (const Type* T)
unsigned FuncTypeOf (const Type* T) unsigned FuncTypeOf (const Type* T)
/* Get the code generator flag for calling the function */ /* Get the code generator flag for calling the function */
{ {
switch (GetUnderlyingTypeCode (T)) { if (GetUnderlyingTypeCode (T) == T_FUNC) {
return (((FuncDesc*) T->A.P)->Flags & FD_VARIADIC) ? 0 : CF_FIXARGC;
case T_FUNC: } else {
return (((FuncDesc*) T->A.P)->Flags & FD_VARIADIC) ? 0 : CF_FIXARGC; Error ("Illegal function type %04lX", T->C);
return 0;
default:
Error ("Illegal function type %04lX", T->C);
return 0;
} }
} }