Skip to content
Permalink
Browse files

Removed a redundant switch and added a default case to the mixin pars…

…ing code to shut GCC up.
  • Loading branch information
Doom2fan committed Jan 4, 2020
1 parent c0b9bb6 commit 6ccbccc3de82259a8362b3673977ff6eab37ac43
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/scripting/zscript/zcc_compile.cpp
@@ -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);

0 comments on commit 6ccbccc

Please sign in to comment.
You can’t perform that action at this time.