mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 01:56:41 +00:00 
			
		
		
		
	Merge branch 'no_at_boundaries' into 'master'
Don't use at() instead [] when length is checked/known See merge request OpenMW/openmw!866
This commit is contained in:
		
						commit
						62c7adc87b
					
				
					 3 changed files with 4 additions and 4 deletions
				
			
		|  | @ -417,7 +417,7 @@ namespace MWRender | ||||||
|                 { |                 { | ||||||
|                     try |                     try | ||||||
|                     { |                     { | ||||||
|                         unsigned int index = cell->mContextList.at(i).index; |                         unsigned int index = cell->mContextList[i].index; | ||||||
|                         if (esm.size()<=index) |                         if (esm.size()<=index) | ||||||
|                             esm.resize(index+1); |                             esm.resize(index+1); | ||||||
|                         cell->restore(esm[index], i); |                         cell->restore(esm[index], i); | ||||||
|  |  | ||||||
|  | @ -547,7 +547,7 @@ namespace MWWorld | ||||||
|             try |             try | ||||||
|             { |             { | ||||||
|                 // Reopen the ESM reader and seek to the right position.
 |                 // Reopen the ESM reader and seek to the right position.
 | ||||||
|                 int index = mCell->mContextList.at(i).index; |                 int index = mCell->mContextList[i].index; | ||||||
|                 mCell->restore (esm[index], i); |                 mCell->restore (esm[index], i); | ||||||
| 
 | 
 | ||||||
|                 ESM::CellRef ref; |                 ESM::CellRef ref; | ||||||
|  | @ -606,7 +606,7 @@ namespace MWWorld | ||||||
|             try |             try | ||||||
|             { |             { | ||||||
|                 // Reopen the ESM reader and seek to the right position.
 |                 // Reopen the ESM reader and seek to the right position.
 | ||||||
|                 int index = mCell->mContextList.at(i).index; |                 int index = mCell->mContextList[i].index; | ||||||
|                 mCell->restore (esm[index], i); |                 mCell->restore (esm[index], i); | ||||||
| 
 | 
 | ||||||
|                 ESM::CellRef ref; |                 ESM::CellRef ref; | ||||||
|  |  | ||||||
|  | @ -1003,7 +1003,7 @@ namespace MWWorld | ||||||
|         if (index >= mStatic.size()) { |         if (index >= mStatic.size()) { | ||||||
|             return nullptr; |             return nullptr; | ||||||
|         } |         } | ||||||
|         return &mStatic.at(index); |         return &mStatic[index]; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const ESM::Attribute *Store<ESM::Attribute>::find(size_t index) const |     const ESM::Attribute *Store<ESM::Attribute>::find(size_t index) const | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue