Skip to content

Commit e480ebd

Browse files
committed
(glslang) Syntax cleanups, other cleanups
1 parent a8fe9b7 commit e480ebd

15 files changed

Lines changed: 1359 additions & 1226 deletions

File tree

deps/glslang/glslang/glslang/MachineIndependent/Constant.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
191191
break;
192192

193193
case EbtUint8:
194-
if (rightUnionArray[i] == 0) {
194+
if (rightUnionArray[i] == 0)
195195
newConstArray[i].setU8Const(0xFF);
196-
} else
196+
else
197197
newConstArray[i].setU8Const(leftUnionArray[i].getU8Const() / rightUnionArray[i].getU8Const());
198198
break;
199199

@@ -207,9 +207,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right
207207
break;
208208

209209
case EbtUint16:
210-
if (rightUnionArray[i] == 0) {
210+
if (rightUnionArray[i] == 0)
211211
newConstArray[i].setU16Const(0xFFFF);
212-
} else
212+
else
213213
newConstArray[i].setU16Const(leftUnionArray[i].getU16Const() / rightUnionArray[i].getU16Const());
214214
break;
215215

deps/glslang/glslang/glslang/MachineIndependent/LiveTraverser.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,17 @@ class TLiveTraverser : public TIntermTraverser {
104104
return true; // traverse all code
105105

106106
TIntermConstantUnion* constant = node->getCondition()->getAsConstantUnion();
107-
if (constant) {
107+
if (constant)
108+
{
108109
// cull the path that is dead
109110
if (constant->getConstArray()[0].getBConst() == true && node->getTrueBlock())
110111
node->getTrueBlock()->traverse(this);
111112
if (constant->getConstArray()[0].getBConst() == false && node->getFalseBlock())
112113
node->getFalseBlock()->traverse(this);
113114

114115
return false; // don't traverse any more, we did it all above
115-
} else
116-
return true; // traverse the whole subtree
116+
}
117+
return true; // traverse the whole subtree
117118
}
118119

119120
// Track live functions as well as uniforms, so that we don't visit dead functions

0 commit comments

Comments
 (0)