Skip to content

Commit

Permalink
Fixed|libcommon: Warnings about signed/unsigned comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Nov 3, 2013
1 parent 8939486 commit b9400a1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions doomsday/plugins/common/src/polyobjs.cpp
Expand Up @@ -34,6 +34,8 @@

#include "polyobjs.h"

#define POBJ_PERPETUAL 0xffffffffu // -1

/// @return Tag of the found polyobj; otherwise @c 0.
static int findMirrorPolyobj(int tag)
{
Expand Down Expand Up @@ -112,7 +114,7 @@ void T_RotatePoly(void *polyThinker)
{
absSpeed = abs(pe->intSpeed);

if(pe->dist == -1)
if(pe->dist == POBJ_PERPETUAL)
{
// perpetual polyobj.
return;
Expand Down Expand Up @@ -167,8 +169,8 @@ boolean EV_RotatePoly(Line *line, byte *args, int direction, boolean overRide)
if(args[2] == 255)
{
// Perpetual rotation.
pe->dist = -1;
po->destAngle = -1;
pe->dist = POBJ_PERPETUAL;
po->destAngle = POBJ_PERPETUAL;
}
else
{
Expand Down Expand Up @@ -207,8 +209,8 @@ boolean EV_RotatePoly(Line *line, byte *args, int direction, boolean overRide)
{
if(args[2] == 255)
{
pe->dist = -1;
po->destAngle = -1;
pe->dist = POBJ_PERPETUAL;
po->destAngle = POBJ_PERPETUAL;
}
else
{
Expand Down Expand Up @@ -645,7 +647,7 @@ void PO_InitForMap()
{
if((mapSpots[j].doomEdNum == PO_SPAWN_DOOMEDNUM ||
mapSpots[j].doomEdNum == PO_SPAWNCRUSH_DOOMEDNUM) &&
mapSpots[j].angle == po->tag)
mapSpots[j].angle == angle_t(po->tag))
{
// Polyobj mapspot.
spot = &mapSpots[j];
Expand Down

0 comments on commit b9400a1

Please sign in to comment.