geometry: killed compiler warnings

This commit is contained in:
tomasz.wlostowski@cern.ch 2013-09-18 13:14:13 +02:00
parent d8480e4674
commit 23298886a1
3 changed files with 6 additions and 14 deletions

View File

@ -439,7 +439,7 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify()
const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint(const VECTOR2I& aP) const
{
int min_d = INT_MAX;
int nearest;
int nearest = 0;
for ( int i = 0; i < SegmentCount() ; i++ )
{
int d = CSegment(i).Distance(aP);

View File

@ -307,18 +307,7 @@ inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const
{
// fixme: numerical errors for large integers
assert(false);
/*const VECTOR2I d = aB - aA;
ecoord det = d.Dot(d);
ecoord dxdy = (ecoord) d.x * d.y;
ecoord qx =
( (extended_type) aA.x * d.y * d.y + (extended_type) d.x * d.x * x - dxdy *
(aA.y - y) ) / det;
extended_type qy =
( (extended_type) aA.y * d.x * d.x + (extended_type) d.y * d.y * y - dxdy *
(aA.x - x) ) / det;
return VECTOR2<T> ( (T) qx, (T) qy );*/
return VECTOR2I(0, 0);
}

View File

@ -77,7 +77,10 @@ class SHAPE {
* Returns a dynamically allocated copy of the shape
* @retval copy of the shape
*/
virtual SHAPE* Clone() const { assert(false); };
virtual SHAPE* Clone() const {
assert(false);
return NULL;
};
/**
* Function Collide()