Non-Functional: Whitespace, comments, replace accidentally deleted comment.

- fixed ParseHelper.cpp newlines (crlf -> lf)
- removed trailing white space in most source files
- fix some spelling issues
- extra blank lines
- tabs to spaces
- replace #include comment about no location
This commit is contained in:
John Kessenich 2017-01-06 00:34:48 -07:00
parent 3dd32293f4
commit ecba76fe73
60 changed files with 755 additions and 806 deletions

View file

@ -33,7 +33,7 @@
//
//
// Travarse a tree of constants to create a single folded constant.
// Traverse a tree of constants to create a single folded constant.
// It should only be used when the whole tree is known to be constant.
//
@ -45,7 +45,7 @@ class TConstTraverser : public TIntermTraverser {
public:
TConstTraverser(const TConstUnionArray& cUnion, bool singleConstParam, TOperator constructType, const TType& t)
: unionArray(cUnion), type(t),
constructorType(constructType), singleConstantParam(singleConstParam), error(false), isMatrix(false),
constructorType(constructType), singleConstantParam(singleConstParam), error(false), isMatrix(false),
matrixCols(0), matrixRows(0) { index = 0; tOp = EOpNull; }
virtual void visitConstantUnion(TIntermConstantUnion* node);
@ -73,7 +73,7 @@ bool TConstTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
if (! node->isConstructor() && node->getOp() != EOpComma) {
error = true;
return false;
return false;
}
if (node->getSequence().size() == 0) {
@ -84,7 +84,7 @@ bool TConstTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
bool flag = node->getSequence().size() == 1 && node->getSequence()[0]->getAsTyped()->getAsConstantUnion();
if (flag) {
singleConstantParam = true;
singleConstantParam = true;
constructorType = node->getOp();
size = node->getType().computeNumComponents();
@ -93,19 +93,19 @@ bool TConstTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
matrixCols = node->getType().getMatrixCols();
matrixRows = node->getType().getMatrixRows();
}
}
}
for (TIntermSequence::iterator p = node->getSequence().begin();
for (TIntermSequence::iterator p = node->getSequence().begin();
p != node->getSequence().end(); p++) {
if (node->getOp() == EOpComma)
index = 0;
index = 0;
(*p)->traverse(this);
}
if (flag)
}
if (flag)
{
singleConstantParam = false;
singleConstantParam = false;
constructorType = EOpNull;
size = 0;
isMatrix = false;
@ -126,7 +126,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
if (! singleConstantParam) {
int rightUnionSize = node->getType().computeNumComponents();
const TConstUnionArray& rightUnionArray = node->getConstArray();
for (int i = 0; i < rightUnionSize; i++) {
if (index >= instanceSize)
@ -148,7 +148,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
leftUnionArray[i] = rightUnionArray[count];
(index)++;
if (nodeComps > 1)
count++;
}
@ -180,13 +180,13 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node)
return;
if (i == startIndex || (i - startIndex) % (matrixRows + 1) == 0 )
leftUnionArray[i] = rightUnionArray[count];
else
else
leftUnionArray[i].setDConst(0.0);
index++;
if (nodeComps > 1)
count++;
count++;
}
}
}
@ -199,7 +199,7 @@ bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArra
return false;
TConstTraverser it(unionArray, singleConstantParam, constructorType, t);
root->traverse(&it);
if (it.error)
return true;