Browse Source

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
pull/2/head
Alexander Golubev 11 years ago
committed by Maciej Suminski
parent
commit
f2ce42ddb5
  1. 8
      common/gal/opengl/cached_container.cpp
  2. 7
      common/geometry/shape_line_chain.cpp
  3. 8
      include/gal/opengl/cached_container.h
  4. 2
      include/geometry/shape.h
  5. 10
      include/geometry/shape_line_chain.h

8
common/gal/opengl/cached_container.cpp

@ -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 )
{
wxASSERT( aSize > 0 );

7
common/geometry/shape_line_chain.cpp

@ -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
{
BOX2I box_a( aSeg.A, aSeg.B - aSeg.A );

8
include/gal/opengl/cached_container.h

@ -64,14 +64,6 @@ public:
///> @copydoc VERTEX_CONTAINER::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:
///> Maps size of free memory chunks to their offsets
typedef std::pair<unsigned int, unsigned int> CHUNK;

2
include/geometry/shape.h

@ -128,7 +128,7 @@ public:
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
* a collision.

10
include/geometry/shape_line_chain.h

@ -277,16 +277,6 @@ public:
*/
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()
*

Loading…
Cancel
Save