1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-11 18:37:08 +00:00

Small optimization.

This commit is contained in:
Marek Kochanowicz 2013-12-21 11:01:40 +01:00
parent 385824aee0
commit a6c36e2377

View File

@ -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.
bool CheckPerformed = false;
int PrevSum(0);
if (stage <= mBooksSize)
{
@ -32,12 +31,11 @@ void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::str
{
return;
}
PrevSum += mBooksSize;
if ((stage - PrevSum) <= mActivatorsSize)
stage -= mBooksSize;
if ((stage) <= mActivatorsSize)
{
activatorCheck(stage - PrevSum, mReferencables.getActivators(), messages);
activatorCheck(stage, mReferencables.getActivators(), messages);
CheckPerformed = true;
}
@ -45,8 +43,7 @@ void CSMTools::ReferenceableCheckStage::perform(int stage, std::vector< std::str
{
return;
}
PrevSum += mActivatorsSize;
stage -= mActivatorsSize;
}
int CSMTools::ReferenceableCheckStage::setup()