Commit 2b324d50 by Shao Committed by Commit Bot

Fix formatting of struct indexing in intermediate output

This patch fixes 2 format issues in the intermediate output of structs and interface blocks in indexing expressions. 1. Adds the missing line feed (LF) so that the next expression can be started in a newline correctly. 2. Remove unnecessary mDepth++ and mDepth-- to avoid redundant indentions. BUG=angleproject:2031 Change-Id: I04e36443a851df4c26ba6b1cbf3a7f8fd6405d3a Reviewed-on: https://chromium-review.googlesource.com/499569Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
parent 8fab320c
......@@ -265,9 +265,7 @@ bool TOutputTraverser::visitBinary(Visit visit, TIntermBinary *node)
// here where we have that contextual knowledge.
if (node->getOp() == EOpIndexDirectStruct || node->getOp() == EOpIndexDirectInterfaceBlock)
{
mDepth++;
node->getLeft()->traverse(this);
mDepth--;
TIntermConstantUnion *intermConstantUnion = node->getRight()->getAsConstantUnion();
ASSERT(intermConstantUnion);
......@@ -286,6 +284,8 @@ bool TOutputTraverser::visitBinary(Visit visit, TIntermBinary *node)
out << constantUnion->getIConst() << " (field '" << field->name() << "')";
out << "\n";
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment