parent
ca13951205
commit
46466be045
5 changed files with 78 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue