fix a few more warnings

This commit is contained in:
CodeCodon
2015-08-09 01:42:32 -05:00
parent 911578cde7
commit f744e7bf42
3 changed files with 16 additions and 18 deletions
@@ -1356,7 +1356,7 @@ bool Iff::seek(Tag name, BlockType type)
while (!atEndOfForm())
{
if (getCurrentName() == name && (type == BT_either || (type == BT_form && isCurrentForm() || (type == BT_chunk && isCurrentChunk()))))
if ((getCurrentName() == name) && ((type == BT_either) || ((type == BT_form && isCurrentForm()) || (type == BT_chunk && isCurrentChunk()))))
return true;
// advance past the current block
@@ -140,7 +140,6 @@ bool HoverPlaneHelper::findMinimumHoverPlane (const Object & obj, float & roll,
if (!terrainObject)
return false;
float oldPointHeights [10];
Vector normals [10];
Vector avgNormal;
@@ -159,8 +158,6 @@ bool HoverPlaneHelper::findMinimumHoverPlane (const Object & obj, float & roll,
float y = 0.0f;
for (int i = 0; i < 10; ++i)
{
oldPointHeights [i] = points [i].y;
if (terrainObject->getHeight (points [i], y, normals [i]))
{
float waterHeight = 0.0f;
@@ -1184,24 +1184,25 @@ void AlterScheduler::moveObjectsFromAlterNextFrameListToAlterNowList(int schedul
{
PROFILER_AUTO_BLOCK_DEFINE("copy next frame");
NOT_NULL(s_alterNextFrameListFirst);
for (Object *object = s_alterNextFrameListFirst[schedulePhaseIndex]->getNextFromAlterNextFrameList(); object != NULL; )
{
//-- Add object to alter now list. This removes the object from the alter next frame list.
DO_ON_VALIDATE_OBJECTS(validateObject(object));
if (s_alterNextFrameListFirst != NULL) {
for (Object *object = s_alterNextFrameListFirst[schedulePhaseIndex]->getNextFromAlterNextFrameList(); object != NULL; )
{
//-- Add object to alter now list. This removes the object from the alter next frame list.
DO_ON_VALIDATE_OBJECTS(validateObject(object));
//-- Save next object in list.
Object *const nextObject = object->getNextFromAlterNextFrameList();
//-- Save next object in list.
Object *const nextObject = object->getNextFromAlterNextFrameList();
addToAlterNowList(*object);
++s_objectsAltered;
addToAlterNowList(*object);
++s_objectsAltered;
DO_ON_HARDCORE_VALIDATION( DEBUG_FATAL(findObjectInScheduleTimeMap(object), ("found object in time schedule map, unexpected.")) );
DO_ON_HARDCORE_VALIDATION( DEBUG_FATAL(findObjectInAlterNextFrameList(object), ("found object in alter next frame list, unexpected.")) );
DO_ON_HARDCORE_VALIDATION( DEBUG_FATAL(!findObjectInAlterNowList(object), ("didn't find object in alter now list, unexpected.")) );
DO_ON_HARDCORE_VALIDATION( DEBUG_FATAL(findObjectInScheduleTimeMap(object), ("found object in time schedule map, unexpected.")) );
DO_ON_HARDCORE_VALIDATION( DEBUG_FATAL(findObjectInAlterNextFrameList(object), ("found object in alter next frame list, unexpected.")) );
DO_ON_HARDCORE_VALIDATION( DEBUG_FATAL(!findObjectInAlterNowList(object), ("didn't find object in alter now list, unexpected.")) );
//-- Increment loop.
object = nextObject;
//-- Increment loop.
object = nextObject;
}
}
}
}