mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 03:15:32 +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
|
||||
{
|
||||
unsigned int index = cell->mContextList.at(i).index;
|
||||
unsigned int index = cell->mContextList[i].index;
|
||||
if (esm.size()<=index)
|
||||
esm.resize(index+1);
|
||||
cell->restore(esm[index], i);
|
||||
|
|
|
@ -547,7 +547,7 @@ namespace MWWorld
|
|||
try
|
||||
{
|
||||
// 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);
|
||||
|
||||
ESM::CellRef ref;
|
||||
|
@ -606,7 +606,7 @@ namespace MWWorld
|
|||
try
|
||||
{
|
||||
// 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);
|
||||
|
||||
ESM::CellRef ref;
|
||||
|
|
|
@ -1003,7 +1003,7 @@ namespace MWWorld
|
|||
if (index >= mStatic.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
return &mStatic.at(index);
|
||||
return &mStatic[index];
|
||||
}
|
||||
|
||||
const ESM::Attribute *Store<ESM::Attribute>::find(size_t index) const
|
||||
|
|
Loading…
Reference in a new issue