From f2ce42ddb5a570e2b9e947beeccbdc0a22236906 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Fri, 6 Mar 2015 15:26:47 +0100 Subject: [PATCH] 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 --- common/gal/opengl/cached_container.cpp | 8 -------- common/geometry/shape_line_chain.cpp | 7 ------- include/gal/opengl/cached_container.h | 8 -------- include/geometry/shape.h | 2 +- include/geometry/shape_line_chain.h | 10 ---------- 5 files changed, 1 insertion(+), 34 deletions(-) diff --git a/common/gal/opengl/cached_container.cpp b/common/gal/opengl/cached_container.cpp index ffdf55aab6..34bd24df50 100644 --- a/common/gal/opengl/cached_container.cpp +++ b/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 ); diff --git a/common/geometry/shape_line_chain.cpp b/common/geometry/shape_line_chain.cpp index 94ffccc316..dbb3d4f1a9 100644 --- a/common/geometry/shape_line_chain.cpp +++ b/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 ); diff --git a/include/gal/opengl/cached_container.h b/include/gal/opengl/cached_container.h index e4547ceaee..7bfc784cba 100644 --- a/include/gal/opengl/cached_container.h +++ b/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 CHUNK; diff --git a/include/geometry/shape.h b/include/geometry/shape.h index 2746a178ab..89ec3ef991 100644 --- a/include/geometry/shape.h +++ b/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. diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index 3224c6487b..88401c7645 100644 --- a/include/geometry/shape_line_chain.h +++ b/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() *