Commit dbb72d16 authored by Dick Hollenbeck's avatar Dick Hollenbeck

fix some compiler warnings

parent 6b08cb4c
...@@ -160,69 +160,67 @@ bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, ...@@ -160,69 +160,67 @@ bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance,
{ {
switch( aA->Type() ) switch( aA->Type() )
{ {
case SH_RECT: case SH_RECT:
switch( aB->Type() ) switch( aB->Type() )
{ {
case SH_CIRCLE: case SH_CIRCLE:
return Collide( *static_cast<const SHAPE_RECT*>( aA ), return Collide( *static_cast<const SHAPE_RECT*>( aA ),
*static_cast<const SHAPE_CIRCLE*>( aB ), aClearance, aNeedMTV, aMTV ); *static_cast<const SHAPE_CIRCLE*>( aB ), aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN: case SH_LINE_CHAIN:
return Collide( *static_cast<const SHAPE_RECT*>( aA ), return Collide( *static_cast<const SHAPE_RECT*>( aA ),
*static_cast<const SHAPE_LINE_CHAIN*>( aB ), aClearance, aNeedMTV, aMTV ); *static_cast<const SHAPE_LINE_CHAIN*>( aB ), aClearance, aNeedMTV, aMTV );
default: default:
break;
}
break; break;
}
break;
case SH_CIRCLE: case SH_CIRCLE:
switch( aB->Type() ) switch( aB->Type() )
{ {
case SH_RECT: case SH_RECT:
return Collide( *static_cast<const SHAPE_RECT*>( aB ), return Collide( *static_cast<const SHAPE_RECT*>( aB ),
*static_cast<const SHAPE_CIRCLE*>( aA ), aClearance, aNeedMTV, aMTV ); *static_cast<const SHAPE_CIRCLE*>( aA ), aClearance, aNeedMTV, aMTV );
case SH_CIRCLE: case SH_CIRCLE:
return Collide( *static_cast<const SHAPE_CIRCLE*>( aA ), return Collide( *static_cast<const SHAPE_CIRCLE*>( aA ),
*static_cast<const SHAPE_CIRCLE*>( aB ), aClearance, aNeedMTV, aMTV ); *static_cast<const SHAPE_CIRCLE*>( aB ), aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN: case SH_LINE_CHAIN:
return Collide( *static_cast<const SHAPE_CIRCLE*>( aA ), return Collide( *static_cast<const SHAPE_CIRCLE*>( aA ),
*static_cast<const SHAPE_LINE_CHAIN *>( aB ), aClearance, aNeedMTV, aMTV ); *static_cast<const SHAPE_LINE_CHAIN *>( aB ), aClearance, aNeedMTV, aMTV );
default: default:
break;
}
break; break;
}
break;
case SH_LINE_CHAIN: case SH_LINE_CHAIN:
switch( aB->Type() ) switch( aB->Type() )
{ {
case SH_RECT: case SH_RECT:
return Collide( *static_cast<const SHAPE_RECT*>( aB ), return Collide( *static_cast<const SHAPE_RECT*>( aB ),
*static_cast<const SHAPE_LINE_CHAIN*>( aA ), aClearance, aNeedMTV, aMTV ); *static_cast<const SHAPE_LINE_CHAIN*>( aA ), aClearance, aNeedMTV, aMTV );
case SH_CIRCLE:
return Collide( *static_cast<const SHAPE_CIRCLE*>( aB ),
*static_cast<const SHAPE_LINE_CHAIN*>( aA ), aClearance, aNeedMTV, aMTV );
case SH_LINE_CHAIN: case SH_CIRCLE:
return Collide( *static_cast<const SHAPE_LINE_CHAIN*>( aA ), return Collide( *static_cast<const SHAPE_CIRCLE*>( aB ),
*static_cast<const SHAPE_LINE_CHAIN*>( aB ), aClearance, aNeedMTV, aMTV ); *static_cast<const SHAPE_LINE_CHAIN*>( aA ), aClearance, aNeedMTV, aMTV );
default: case SH_LINE_CHAIN:
break; return Collide( *static_cast<const SHAPE_LINE_CHAIN*>( aA ),
} *static_cast<const SHAPE_LINE_CHAIN*>( aB ), aClearance, aNeedMTV, aMTV );
break;
default: default:
break; break;
} }
break;
bool unsupported_collision = true; default:
break;
}
assert( unsupported_collision == false ); assert( 0 ); // unsupported_collision
return false; return false;
} }
......
...@@ -133,11 +133,15 @@ void Triangle::ClearDelunayEdges() ...@@ -133,11 +133,15 @@ void Triangle::ClearDelunayEdges()
Point* Triangle::OppositePoint( Triangle& t, Point& p ) Point* Triangle::OppositePoint( Triangle& t, Point& p )
{ {
Point* cw = t.PointCW( p ); Point* cw = t.PointCW( p );
/*
double x = cw->x; double x = cw->x;
double y = cw->y; double y = cw->y;
x = p.x; x = p.x;
y = p.y; y = p.y;
*/
return PointCW( *cw ); return PointCW( *cw );
} }
...@@ -195,6 +199,7 @@ int Triangle::Index( const Point* p ) ...@@ -195,6 +199,7 @@ int Triangle::Index( const Point* p )
} }
assert( 0 ); assert( 0 );
return 0; // you better hope its a Debug build.
} }
...@@ -285,6 +290,7 @@ Point* Triangle::PointCW( Point& point ) ...@@ -285,6 +290,7 @@ Point* Triangle::PointCW( Point& point )
} }
assert( 0 ); assert( 0 );
return NULL; // you better hope its a Debug build.
} }
...@@ -305,6 +311,7 @@ Point* Triangle::PointCCW( Point& point ) ...@@ -305,6 +311,7 @@ Point* Triangle::PointCCW( Point& point )
} }
assert( 0 ); assert( 0 );
return NULL; // you better hope its a Debug build.
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment