Add anonymous members as a new symbol table type, so the infrastructure can handle blocks with no names.
Also, add more safety to the types involved regarding copy constructors, operator=, etc. git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21106 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
ed3197921e
commit
ba04210097
11 changed files with 170 additions and 73 deletions
|
|
@ -398,7 +398,11 @@ public:
|
|||
TType() {}
|
||||
virtual ~TType() {}
|
||||
|
||||
TType(const TType& type) { *this = type; }
|
||||
// "dumb" copy, using built-in operator=(), not for use across pool pops.
|
||||
// It will also cause multiple copies of TType to point to the same information.
|
||||
// This only works if that information (like a structure's list of types) does not
|
||||
// change.
|
||||
explicit TType(const TType& type) { *this = type; }
|
||||
|
||||
void copyType(const TType& copyOf, const TStructureMap& remapper)
|
||||
{
|
||||
|
|
@ -680,7 +684,7 @@ protected:
|
|||
TArraySizes arraySizes;
|
||||
|
||||
TTypeList* structure; // 0 unless this is a struct
|
||||
mutable int structureSize;
|
||||
mutable int structureSize; // a cache, updated on first access
|
||||
int maxArraySize;
|
||||
TType* arrayInformationType;
|
||||
TString *fieldName; // for structure field names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue