fix several -Woverloaded-virtual warnings in common/* dir

- CACHED_CONTAINER::GetVertices: removed useless and unused function
   which does nothing but tainted the API
 - SHAPE_LINE_CHAIN::Collide( const BOX2I& aBox, int aClearance ):
   removed an outdated function with assert(false)
 - SHAPE::BBox(): fix a small typo in the doc string
This commit is contained in:
Alexander Golubev 2015-03-06 15:26:47 +01:00 committed by Maciej Suminski
parent c3e3ff3682
commit f2ce42ddb5
5 changed files with 1 additions and 34 deletions

View File

@ -203,14 +203,6 @@ void CACHED_CONTAINER::Clear()
} }
VERTEX* CACHED_CONTAINER::GetVertices( const VERTEX_ITEM* aItem ) const
{
int offset = aItem->GetOffset();
return &m_vertices[offset];
}
unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize )
{ {
wxASSERT( aSize > 0 ); wxASSERT( aSize > 0 );

View File

@ -35,13 +35,6 @@ bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const
} }
bool SHAPE_LINE_CHAIN::Collide( const BOX2I& aBox, int aClearance ) const
{
assert( false );
return false;
}
bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance ) const bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance ) const
{ {
BOX2I box_a( aSeg.A, aSeg.B - aSeg.A ); BOX2I box_a( aSeg.A, aSeg.B - aSeg.A );

View File

@ -64,14 +64,6 @@ public:
///> @copydoc VERTEX_CONTAINER::Clear() ///> @copydoc VERTEX_CONTAINER::Clear()
virtual void Clear(); virtual void Clear();
/**
* Function GetVertices()
* returns the vertices stored by the specific item.
*
* @param aItem is the item.
*/
virtual VERTEX* GetVertices( const VERTEX_ITEM* aItem ) const;
protected: protected:
///> Maps size of free memory chunks to their offsets ///> Maps size of free memory chunks to their offsets
typedef std::pair<unsigned int, unsigned int> CHUNK; typedef std::pair<unsigned int, unsigned int> CHUNK;

View File

@ -128,7 +128,7 @@ public:
virtual bool Collide( const SEG& aSeg, int aClearance = 0 ) const = 0; virtual bool Collide( const SEG& aSeg, int aClearance = 0 ) const = 0;
/** /**
* Function Collide() * Function BBox()
* *
* Computes a bounding box of the shape, with a margin of aClearance * Computes a bounding box of the shape, with a margin of aClearance
* a collision. * a collision.

View File

@ -277,16 +277,6 @@ public:
*/ */
bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const; bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const;
/**
* Function Collide()
*
* Checks if box aBox lies closer to us than aClearance.
* @param aBox the box to check for collisions with
* @param aClearance minimum distance that does not qualify as a collision.
* @return true, when a collision has been found
*/
bool Collide( const BOX2I& aBox, int aClearance = 0 ) const;
/** /**
* Function Collide() * Function Collide()
* *