forked from mirror/openmw-tes3mp
Silence static analysis warnings
This commit is contained in:
parent
dc1f788cff
commit
cf496287f7
3 changed files with 8 additions and 5 deletions
|
@ -428,7 +428,9 @@ namespace MWGui
|
|||
{
|
||||
// split lines
|
||||
const int lineHeight = currentFontHeight();
|
||||
unsigned int lastLine = (mPaginator.getStartTop() + mPaginator.getPageHeight() - mPaginator.getCurrentTop()) / lineHeight;
|
||||
unsigned int lastLine = (mPaginator.getStartTop() + mPaginator.getPageHeight() - mPaginator.getCurrentTop());
|
||||
if (lineHeight > 0)
|
||||
lastLine /= lineHeight;
|
||||
int ret = mPaginator.getCurrentTop() + lastLine * lineHeight;
|
||||
|
||||
// first empty lines that would go to the next page should be ignored
|
||||
|
|
|
@ -996,6 +996,8 @@ namespace MWPhysics
|
|||
bool PhysicsSystem::canMoveToWaterSurface(const MWWorld::ConstPtr &actor, const float waterlevel)
|
||||
{
|
||||
const Actor* physicActor = getActor(actor);
|
||||
if (!physicActor)
|
||||
return false;
|
||||
const float halfZ = physicActor->getHalfExtents().z();
|
||||
const osg::Vec3f actorPosition = physicActor->getPosition();
|
||||
const osg::Vec3f startingPosition(actorPosition.x(), actorPosition.y(), actorPosition.z() + halfZ);
|
||||
|
|
|
@ -402,8 +402,7 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
|
|||
std::pair<std::vector<int>, bool> itemsSlots =
|
||||
weapon->getClass().getEquipmentSlots (*weapon);
|
||||
|
||||
for (std::vector<int>::const_iterator slot (itemsSlots.first.begin());
|
||||
slot!=itemsSlots.first.end(); ++slot)
|
||||
if (!itemsSlots.first.empty())
|
||||
{
|
||||
if (!itemsSlots.second)
|
||||
{
|
||||
|
@ -413,8 +412,8 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
|
|||
}
|
||||
}
|
||||
|
||||
slots_[*slot] = weapon;
|
||||
break;
|
||||
int slot = itemsSlots.first.front();
|
||||
slots_[slot] = weapon;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue