mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 09:36:40 +00:00
Small optimization.
This commit is contained in:
parent
385824aee0
commit
a6c36e2377
1 changed files with 5 additions and 8 deletions
|
@ -20,7 +20,6 @@ void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::str
|
||||||
{
|
{
|
||||||
//Checks for books, than, when stage is above mBooksSize goes to other checks, with (stage - PrevSum) as stage.
|
//Checks for books, than, when stage is above mBooksSize goes to other checks, with (stage - PrevSum) as stage.
|
||||||
bool CheckPerformed = false;
|
bool CheckPerformed = false;
|
||||||
int PrevSum(0);
|
|
||||||
|
|
||||||
if (stage <= mBooksSize)
|
if (stage <= mBooksSize)
|
||||||
{
|
{
|
||||||
|
@ -32,12 +31,11 @@ void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::str
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
stage -= mBooksSize;
|
||||||
PrevSum += mBooksSize;
|
|
||||||
|
if ((stage) <= mActivatorsSize)
|
||||||
if ((stage - PrevSum) <= mActivatorsSize)
|
|
||||||
{
|
{
|
||||||
activatorCheck(stage - PrevSum, mReferencables.getActivators(), messages);
|
activatorCheck(stage, mReferencables.getActivators(), messages);
|
||||||
CheckPerformed = true;
|
CheckPerformed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +43,7 @@ void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::str
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
stage -= mActivatorsSize;
|
||||||
PrevSum += mActivatorsSize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CSMTools::ReferenceableCheckStage::setup()
|
int CSMTools::ReferenceableCheckStage::setup()
|
||||||
|
|
Loading…
Reference in a new issue