2
0
Эх сурвалжийг харах

* PEAPI.cs: make sure small index sizes get set properly. Use a
continue to reduce nesting a little and make code almost mildly
readable.

svn path=/trunk/mcs/; revision=31242

Jackson Harper 21 жил өмнө
parent
commit
e5b15494b2

+ 6 - 0
mcs/class/PEAPI/ChangeLog

@@ -1,3 +1,9 @@
+2004-07-16  Jackson Harper  <[email protected]>
+
+	* PEAPI.cs: make sure small index sizes get set properly. Use a
+	continue to reduce nesting a little and make code almost mildly
+	readable.
+	
 2004-07-13  Jackson Harper  <[email protected]>
 
 	* PEAPI.cs: Use a byte array hash code provider and comprarer, so

+ 7 - 6
mcs/class/PEAPI/PEAPI.cs

@@ -4636,11 +4636,14 @@ if (rsrc != null)
     
     private void SetIndexSizes() {
       for (int i=0; i < numMetaDataTables; i++) {
-        if (metaDataTables[i] != null) {
+          if (metaDataTables[i] == null)
+                  continue;
+
           uint count = (uint)metaDataTables[i].Count;
-          if (count > maxSmlIxSize) {
-            largeIx[i] = true;
-                                                MDTable tabIx = (MDTable)i;
+          if (count > maxSmlIxSize)
+                  largeIx[i] = true;
+
+            MDTable tabIx = (MDTable)i;
             if (count > max5BitSmlIx) {
               lgeCIx[(int)CIx.HasCustomAttr] = true;
             }
@@ -4672,8 +4675,6 @@ if (rsrc != null)
               if ((tabIx == MDTable.TypeDef) || (tabIx == MDTable.Method)) 
                 lgeCIx[(int)CIx.TypeOrMethodDef] = true; 
             }
-          }
-        }
       }
                         if (strings.LargeIx()) {
                                 largeStrings = true;