Simplified TType class by carving out TStructure and TField.

R=kbr@chromium.org

Review URL: https://codereview.appspot.com/9866043

git-svn-id: https://angleproject.googlecode.com/svn/trunk@2423 736b8ea6-26fd-11df-bfd4-992fa37f6226

TRAC #23415
Authored-by: alokp@chromium.org
Signed-off-by: Shannon Woods
Signed-off-by Nicolas Capens
Merged-by: Jamie Madill
diff --git a/src/compiler/Intermediate.cpp b/src/compiler/Intermediate.cpp
index 87dfbd1..21098f0 100644
--- a/src/compiler/Intermediate.cpp
+++ b/src/compiler/Intermediate.cpp
@@ -1142,16 +1142,16 @@
 
 bool CompareStruct(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray)
 {
-    const TTypeList* fields = leftNodeType.getStruct();
+    const TFieldList& fields = leftNodeType.getStruct()->fields();
 
-    size_t structSize = fields->size();
+    size_t structSize = fields.size();
     size_t index = 0;
 
     for (size_t j = 0; j < structSize; j++) {
-        size_t size = (*fields)[j].type->getObjectSize();
+        size_t size = fields[j]->type()->getObjectSize();
         for (size_t i = 0; i < size; i++) {
-            if ((*fields)[j].type->getBasicType() == EbtStruct) {
-                if (!CompareStructure(*(*fields)[j].type, &rightUnionArray[index], &leftUnionArray[index]))
+            if (fields[j]->type()->getBasicType() == EbtStruct) {
+                if (!CompareStructure(*fields[j]->type(), &rightUnionArray[index], &leftUnionArray[index]))
                     return false;
             } else {
                 if (leftUnionArray[index] != rightUnionArray[index])