Skip to content

Commit

Permalink
Removed a redundant switch and added a default case to the mixin pars…
Browse files Browse the repository at this point in the history
…ing code to shut GCC up.
  • Loading branch information
Doom2fan committed Jan 4, 2020
1 parent c0b9bb6 commit 6ccbccc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/scripting/zscript/zcc_compile.cpp
Expand Up @@ -388,22 +388,22 @@ ZCCCompiler::ZCCCompiler(ZCC_AST &ast, DObject *_outer, PSymbolTable &_symbols,
ZCC_TreeNode *node = ast.TopNode;
PSymbolTreeNode *tnode;

// [pbeta] Mixins must be processed before everything else.
// [pbeta] Anything that must be processed before classes, structs, etc. should go here.
do
{
switch (node->NodeType)
{
// [pbeta] Mixins must be processed before everything else.
case AST_MixinDef:
if ((tnode = AddTreeNode(static_cast<ZCC_NamedNode *>(node)->NodeName, node, GlobalTreeNodes)))
{
switch (node->NodeType)
{
case AST_MixinDef:
ProcessMixin(static_cast<ZCC_MixinDef *>(node), tnode);
break;
}
ProcessMixin(static_cast<ZCC_MixinDef *>(node), tnode);
break;
}
break;

default:
break; // Shut GCC up.
}
node = node->SiblingNext;
} while (node != ast.TopNode);
Expand Down

0 comments on commit 6ccbccc

Please sign in to comment.