Use std::variant to represent TSpirvTypeParameter
This PR is try to address the review comment: https://github.com/KhronosGroup/glslang/pull/3253#discussion_r1254932979.
This commit is contained in:
parent
afe6e781bd
commit
323836e46b
3 changed files with 35 additions and 29 deletions
|
|
@ -45,11 +45,11 @@ namespace glslang {
|
|||
|
||||
bool TSpirvTypeParameter::operator==(const TSpirvTypeParameter& rhs) const
|
||||
{
|
||||
if (constant != nullptr)
|
||||
return constant->getConstArray() == rhs.constant->getConstArray();
|
||||
if (getAsConstant() != nullptr)
|
||||
return getAsConstant()->getConstArray() == rhs.getAsConstant()->getConstArray();
|
||||
|
||||
assert(type != nullptr);
|
||||
return *type == *rhs.type;
|
||||
assert(getAsType() != nullptr);
|
||||
return *getAsType() == *rhs.getAsType();
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue