private void EnsureCapacity()
 {
     if (this.m_DocumentCount == 0)
     {
         this.m_Documents = new REDocument[0x10];
     }
     else if (this.m_DocumentCount == this.m_Documents.Length)
     {
         REDocument[] destinationArray = new REDocument[this.m_DocumentCount * 2];
         Array.Copy(this.m_Documents, destinationArray, this.m_DocumentCount);
         this.m_Documents = destinationArray;
     }
 }
 private void EnsureCapacity()
 {
     if (this.m_DocumentCount == 0)
     {
         this.m_Documents = new REDocument[0x10];
     }
     else if (this.m_DocumentCount == this.m_Documents.Length)
     {
         REDocument[] destinationArray = new REDocument[this.m_DocumentCount * 2];
         Array.Copy(this.m_Documents, destinationArray, this.m_DocumentCount);
         this.m_Documents = destinationArray;
     }
 }
Example #3
0
 // Token: 0x060049E0 RID: 18912 RVA: 0x0010B104 File Offset: 0x00109304
 private void EnsureCapacity()
 {
     if (this.m_DocumentCount == 0)
     {
         this.m_Documents = new REDocument[16];
         return;
     }
     if (this.m_DocumentCount == this.m_Documents.Length)
     {
         REDocument[] array = new REDocument[this.m_DocumentCount * 2];
         Array.Copy(this.m_Documents, array, this.m_DocumentCount);
         this.m_Documents = array;
     }
 }
Example #4
0
 private void EnsureCapacity()
 {
     if (this.m_DocumentCount == 0)
     {
         this.m_Documents = new REDocument[16];
     }
     else
     {
         if (this.m_DocumentCount != this.m_Documents.Length)
         {
             return;
         }
         REDocument[] reDocumentArray = new REDocument[this.m_DocumentCount * 2];
         Array.Copy((Array)this.m_Documents, (Array)reDocumentArray, this.m_DocumentCount);
         this.m_Documents = reDocumentArray;
     }
 }
Example #5
0
 /**************************
 *
 * Helper to ensure arrays are large enough
 *
 **************************/
 private void EnsureCapacity()
 {
     if (m_DocumentCount == 0)
     {
         // First time. Allocate the arrays.
         m_Documents = new REDocument[InitialSize];
     }
     else if (m_DocumentCount == m_Documents.Length)
     {
         // the arrays are full. Enlarge the arrays
         REDocument[] temp = new REDocument [m_DocumentCount * 2];
         Array.Copy(m_Documents, temp, m_DocumentCount);
         m_Documents = temp;
     }
 }
Example #6
0
 // Find a REDocument representing document. If we cannot find one, we will add a new entry into
 // the REDocument array.
 private int FindDocument(ISymbolDocumentWriter document)
 {
     int         i;
     
     // This is an optimization. The chance that the previous line is coming from the same
     // document is very high.
     if (m_iLastFound < m_DocumentCount && m_Documents[m_iLastFound].m_document == document)
         return m_iLastFound;
         
     for (i = 0; i < m_DocumentCount; i++)
     {
         if (m_Documents[i].m_document == document)
         {
             m_iLastFound = i;
             return m_iLastFound;
         }
     }
     
     // cannot find an existing document so add one to the array                                       
     EnsureCapacity();
     m_iLastFound = m_DocumentCount;
     m_Documents[m_iLastFound] = new REDocument(document);
     checked { m_DocumentCount++; }
     return m_iLastFound;
 }