X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FMono.Cecil%2FMono.Cecil.Metadata%2FMetadataRowReader.cs;h=c8b537459157374d5799e067f068d467a2570a75;hb=8ef4e4703172fd32ada3f74b22df5203b4683493;hp=d09b1f0de28f181f75812942f2ea3d9ae9c3a860;hpb=8231bb807cc603df21679dc67936d719bf16ad9d;p=mono.git diff --git a/mcs/class/Mono.Cecil/Mono.Cecil.Metadata/MetadataRowReader.cs b/mcs/class/Mono.Cecil/Mono.Cecil.Metadata/MetadataRowReader.cs index d09b1f0de28..c8b53745915 100644 --- a/mcs/class/Mono.Cecil/Mono.Cecil.Metadata/MetadataRowReader.cs +++ b/mcs/class/Mono.Cecil/Mono.Cecil.Metadata/MetadataRowReader.cs @@ -37,11 +37,13 @@ namespace Mono.Cecil.Metadata { using Mono.Cecil.Binary; - class MetadataRowReader : BaseMetadataRowVisitor { + sealed class MetadataRowReader : BaseMetadataRowVisitor { MetadataTableReader m_mtrv; BinaryReader m_binaryReader; MetadataRoot m_metadataRoot; + + Utilities.TableRowCounter m_counter; int [] m_ciCache; int m_blobHeapIdxSz; @@ -54,6 +56,7 @@ namespace Mono.Cecil.Metadata { m_binaryReader = mtrv.GetReader (); m_metadataRoot = mtrv.GetMetadataRoot (); m_ciCache = new int [13]; + m_counter = new Utilities.TableRowCounter (m_mtrv.GetNumberOfRows); } int GetIndexSize (int rid) @@ -63,8 +66,7 @@ namespace Mono.Cecil.Metadata { int GetCodedIndexSize (CodedIndex ci) { - return Utilities.GetCodedIndexSize (ci, - new Utilities.TableRowCounter (m_mtrv.GetNumberOfRows), m_ciCache); + return Utilities.GetCodedIndexSize (ci, m_counter, m_ciCache); } uint ReadByIndexSize (int size)