bool UnfoldShortCircuitAST::visitBinary(Visit visit, TIntermBinary *node) { TIntermSelection *replacement = NULL; switch (node->getOp()) { case EOpLogicalOr: replacement = UnfoldOR(node->getLeft(), node->getRight()); break; case EOpLogicalAnd: replacement = UnfoldAND(node->getLeft(), node->getRight()); break; default: break; } if (replacement) { queueReplacement(node, replacement, OriginalNode::IS_DROPPED); } return true; }
bool UnfoldShortCircuitAST::visitBinary(Visit visit, TIntermBinary *node) { TIntermSelection *replacement = NULL; switch (node->getOp()) { case EOpLogicalOr: replacement = UnfoldOR(node->getLeft(), node->getRight()); break; case EOpLogicalAnd: replacement = UnfoldAND(node->getLeft(), node->getRight()); break; default: break; } if (replacement) { mReplacements.push_back( NodeUpdateEntry(getParentNode(), node, replacement, false)); } return true; }