@@ -2446,11 +2446,15 @@ public:
|
||||
//
|
||||
bool sameStructType(const TType& right) const
|
||||
{
|
||||
// TODO: Why return true when neither types are structures?
|
||||
// Most commonly, they are both nullptr, or the same pointer to the same actual structure
|
||||
if ((!isStruct() && !right.isStruct()) ||
|
||||
(isStruct() && right.isStruct() && structure == right.structure))
|
||||
return true;
|
||||
|
||||
if (!isStruct() || !right.isStruct())
|
||||
return false;
|
||||
|
||||
// Structure names have to match
|
||||
if (*typeName != *right.typeName)
|
||||
return false;
|
||||
@@ -2460,8 +2464,7 @@ public:
|
||||
bool isGLPerVertex = *typeName == "gl_PerVertex";
|
||||
|
||||
// Both being nullptr was caught above, now they both have to be structures of the same number of elements
|
||||
if (!isStruct() || !right.isStruct() ||
|
||||
(structure->size() != right.structure->size() && !isGLPerVertex))
|
||||
if (structure->size() != right.structure->size() && !isGLPerVertex)
|
||||
return false;
|
||||
|
||||
// Compare the names and types of all the members, which have to match
|
||||
|
||||
@@ -1321,7 +1321,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
|
||||
// Find it in the symbol table.
|
||||
//
|
||||
const TFunction* fnCandidate;
|
||||
bool builtIn;
|
||||
bool builtIn {false};
|
||||
fnCandidate = findFunction(loc, *function, builtIn);
|
||||
if (fnCandidate) {
|
||||
// This is a declared function that might map to
|
||||
|
||||
Reference in New Issue
Block a user