mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 13:19:40 +00:00
Silence some scan-build warnings.
This commit is contained in:
parent
feeb740497
commit
b5eb16b663
4 changed files with 10 additions and 23 deletions
|
@ -386,8 +386,6 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
int sectionHeightLeft = sectionHeight;
|
int sectionHeightLeft = sectionHeight;
|
||||||
while (sectionHeightLeft > mPageHeight)
|
while (sectionHeightLeft > mPageHeight)
|
||||||
{
|
{
|
||||||
spaceLeft = mPageHeight - (curPageStop - curPageStart);
|
|
||||||
|
|
||||||
// Adjust to the top of the first line that does not fit on the current page anymore
|
// Adjust to the top of the first line that does not fit on the current page anymore
|
||||||
int splitPos = curPageStop;
|
int splitPos = curPageStop;
|
||||||
for (Lines::iterator j = i->mLines.begin (); j != i->mLines.end (); ++j)
|
for (Lines::iterator j = i->mLines.begin (); j != i->mLines.end (); ++j)
|
||||||
|
|
|
@ -150,7 +150,6 @@ namespace MWGui
|
||||||
parseFont(tag);
|
parseFont(tag);
|
||||||
if (currentWidth != 0) {
|
if (currentWidth != 0) {
|
||||||
currentHeight += currentFontHeight();
|
currentHeight += currentFontHeight();
|
||||||
currentWidth = 0;
|
|
||||||
}
|
}
|
||||||
currentWidth = 0;
|
currentWidth = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,28 +220,22 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
|
||||||
|
|
||||||
bool use = false;
|
bool use = false;
|
||||||
|
|
||||||
if (slots_.at (*iter2)==end())
|
if (slots_.at (*iter2)!=end())
|
||||||
use = true; // slot was empty before -> skip all further checks
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Ptr old = *slots_.at (*iter2);
|
Ptr old = *slots_.at (*iter2);
|
||||||
|
|
||||||
if (!use)
|
// check skill
|
||||||
|
int oldSkill = old.getClass().getEquipmentSkill (old);
|
||||||
|
|
||||||
|
if (testSkill!=-1 && oldSkill==-1)
|
||||||
|
use = true;
|
||||||
|
else if (testSkill!=-1 && oldSkill!=-1 && testSkill!=oldSkill)
|
||||||
{
|
{
|
||||||
// check skill
|
if (actor.getClass().getSkill(actor, oldSkill) > actor.getClass().getSkill (actor, testSkill))
|
||||||
int oldSkill =
|
continue; // rejected, because old item better matched the NPC's skills.
|
||||||
old.getClass().getEquipmentSkill (old);
|
|
||||||
|
|
||||||
if (testSkill!=-1 && oldSkill==-1)
|
if (actor.getClass().getSkill(actor, oldSkill) < actor.getClass().getSkill (actor, testSkill))
|
||||||
use = true;
|
use = true;
|
||||||
else if (testSkill!=-1 && oldSkill!=-1 && testSkill!=oldSkill)
|
|
||||||
{
|
|
||||||
if (actor.getClass().getSkill(actor, oldSkill) > actor.getClass().getSkill (actor, testSkill))
|
|
||||||
continue; // rejected, because old item better matched the NPC's skills.
|
|
||||||
|
|
||||||
if (actor.getClass().getSkill(actor, oldSkill) < actor.getClass().getSkill (actor, testSkill))
|
|
||||||
use = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!use)
|
if (!use)
|
||||||
|
@ -252,8 +246,6 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
use = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -281,8 +281,6 @@ void ManualBulletShapeLoader::handleNiTriShape(const Nif::NiTriShape *shape, int
|
||||||
// anything. So don't do anything.
|
// anything. So don't do anything.
|
||||||
if ((flags & 0x800) && !raycasting)
|
if ((flags & 0x800) && !raycasting)
|
||||||
{
|
{
|
||||||
collide = false;
|
|
||||||
bbcollide = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue