From 6ccbccc3de82259a8362b3673977ff6eab37ac43 Mon Sep 17 00:00:00 2001 From: Chronos Ouroboros Date: Sat, 4 Jan 2020 15:11:31 -0300 Subject: [PATCH] Removed a redundant switch and added a default case to the mixin parsing code to shut GCC up. --- src/scripting/zscript/zcc_compile.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 6096ac251..16d2dea47 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/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(node)->NodeName, node, GlobalTreeNodes))) { - switch (node->NodeType) - { - case AST_MixinDef: - ProcessMixin(static_cast(node), tnode); - break; - } + ProcessMixin(static_cast(node), tnode); + break; } break; + + default: + break; // Shut GCC up. } node = node->SiblingNext; } while (node != ast.TopNode);