fix g++ compilation issues

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24043 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-11-13 20:50:21 +00:00
parent ec252dfd3b
commit e4f45cbf49
3 changed files with 9 additions and 8 deletions

View file

@ -3082,11 +3082,10 @@ TIntermTyped* TParseContext::addConstructor(TSourceLoc loc, TIntermNode* node, c
if (op == EOpConstructStruct)
memberTypes = type.getStruct()->begin();
const TType* elementType;
TType elementType;
elementType.shallowCopy(type);
if (type.isArray())
elementType = &TType(type, 0); // dereferenced type
else
elementType = &type;
elementType.dereference();
bool singleArg;
if (aggrNode) {
@ -3102,7 +3101,7 @@ TIntermTyped* TParseContext::addConstructor(TSourceLoc loc, TIntermNode* node, c
// If structure constructor or array constructor is being called
// for only one parameter inside the structure, we need to call constructStruct function once.
if (type.isArray())
newNode = constructStruct(node, *elementType, 1, node->getLoc());
newNode = constructStruct(node, elementType, 1, node->getLoc());
else if (op == EOpConstructStruct)
newNode = constructStruct(node, *(*memberTypes).type, 1, node->getLoc());
else
@ -3130,7 +3129,7 @@ TIntermTyped* TParseContext::addConstructor(TSourceLoc loc, TIntermNode* node, c
for (TIntermSequence::iterator p = sequenceVector.begin();
p != sequenceVector.end(); p++, paramCount++) {
if (type.isArray())
newNode = constructStruct(*p, *elementType, paramCount+1, node->getLoc());
newNode = constructStruct(*p, elementType, paramCount+1, node->getLoc());
else if (op == EOpConstructStruct)
newNode = constructStruct(*p, *(memberTypes[paramCount]).type, paramCount+1, node->getLoc());
else