Removed unused fields in VIEW & ANTIALIASING_SMAA classes

This commit is contained in:
Maciej Suminski 2017-01-17 15:07:57 +01:00
parent ee862e1db4
commit c758f434c0
6 changed files with 10 additions and 25 deletions

View File

@ -122,8 +122,7 @@ namespace KIGFX {
void loadShaders();
void updateUniforms();
bool areBuffersInitialized; //
bool isInitialized; // shaders linked
bool areBuffersInitialized;
unsigned int smaaBaseBuffer; // base + overlay temporary
unsigned int smaaEdgesBuffer;

View File

@ -41,10 +41,8 @@
using namespace KIGFX;
VIEW_GROUP::VIEW_GROUP( VIEW* aView ) :
m_layer( ITEM_GAL_LAYER( GP_OVERLAY ) ),
m_view( aView )
m_layer( ITEM_GAL_LAYER( GP_OVERLAY ) )
{
}
@ -141,10 +139,7 @@ void VIEW_GROUP::ViewGetLayers( int aLayers[], int& aCount ) const
void VIEW_GROUP::FreeItems()
{
for( unsigned int i = 0 ; i < GetSize(); i++ )
{
VIEW_ITEM* item = GetItem(i);
delete item;
}
delete GetItem( i );
Clear();
}

View File

@ -136,8 +136,6 @@ protected:
private:
void updateBbox();
VIEW* m_view;
};
} // namespace KIGFX

View File

@ -194,7 +194,7 @@ int DRAWING_TOOL::PlaceText( const TOOL_EVENT& aEvent )
BOARD_COMMIT commit( m_frame );
// Add a VIEW_GROUP that serves as a preview for the new item
SELECTION preview( m_view );
SELECTION preview;
m_view->Add( &preview );
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
@ -364,7 +364,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
int maxThickness;
// Add a VIEW_GROUP that serves as a preview for the new item
SELECTION preview( m_view );
SELECTION preview;
m_view->Add( &preview );
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
@ -577,7 +577,7 @@ int DRAWING_TOOL::PlaceDXF( const TOOL_EVENT& aEvent )
VECTOR2I delta = cursorPos - list.front()->GetPosition();
// Add a VIEW_GROUP that serves as a preview for the new item
SELECTION preview( m_view );
SELECTION preview;
BOARD_COMMIT commit( m_frame );
// Build the undo list & add items to the current view
@ -799,7 +799,7 @@ bool DRAWING_TOOL::drawSegment( int aShape, DRAWSEGMENT*& aGraphic,
DRAWSEGMENT line45;
// Add a VIEW_GROUP that serves as a preview for the new item
SELECTION preview( m_view );
SELECTION preview;
m_view->Add( &preview );
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
@ -987,7 +987,7 @@ bool DRAWING_TOOL::drawArc( DRAWSEGMENT*& aGraphic )
helperLine.SetWidth( 1 );
// Add a VIEW_GROUP that serves as a preview for the new item
SELECTION preview( m_view );
SELECTION preview;
m_view->Add( &preview );
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );
@ -1166,7 +1166,7 @@ int DRAWING_TOOL::drawZone( bool aKeepout )
BOARD_COMMIT commit( m_frame );
// Add a VIEW_GROUP that serves as a preview for the new item
SELECTION preview( m_view );
SELECTION preview;
m_view->Add( &preview );
m_toolMgr->RunAction( COMMON_ACTIONS::selectionClear, true );

View File

@ -1399,11 +1399,6 @@ bool SELECTION_TOOL::SanitizeSelection()
}
SELECTION::SELECTION( KIGFX::VIEW* aView ) :
KIGFX::VIEW_GROUP( aView )
{}
void SELECTION::clear()
{
m_items.clear();

View File

@ -55,8 +55,6 @@ public:
using ITER = std::set<BOARD_ITEM*>::iterator;
using CITER = std::set<BOARD_ITEM*>::const_iterator;
SELECTION( KIGFX::VIEW* aView = nullptr );
ITER begin() { return m_items.begin(); }
ITER end() { return m_items.end(); }
CITER begin() const { return m_items.cbegin(); }