Fix minor compil warnings.

This commit is contained in:
jean-pierre charras 2019-05-31 21:19:35 +02:00
parent 30ad8e9369
commit 4842c73530
2 changed files with 7 additions and 7 deletions

View File

@ -42,11 +42,11 @@ WS_PROXY_UNDO_ITEM::WS_PROXY_UNDO_ITEM( const EDA_DRAW_FRAME* aFrame ) :
WS_DATA_MODEL& model = WS_DATA_MODEL::GetTheInstance();
model.SaveInString( m_layoutSerialization );
for( int ii = 0; ii < model.GetItems().size(); ++ii )
for( size_t ii = 0; ii < model.GetItems().size(); ++ii )
{
WS_DATA_ITEM* dataItem = model.GetItem( ii );
for( int jj = 0; jj < dataItem->GetDrawItems().size(); ++jj )
for( size_t jj = 0; jj < dataItem->GetDrawItems().size(); ++jj )
{
WS_DRAW_ITEM_BASE* drawItem = dataItem->GetDrawItems()[ jj ];
@ -75,13 +75,13 @@ void WS_PROXY_UNDO_ITEM::Restore( EDA_DRAW_FRAME* aFrame, KIGFX::VIEW* aView )
{
aView->Clear();
for( int ii = 0; ii < WS_DATA_MODEL::GetTheInstance().GetItems().size(); ++ii )
for( int ii = 0; ii < (int)WS_DATA_MODEL::GetTheInstance().GetItems().size(); ++ii )
{
WS_DATA_ITEM* dataItem = WS_DATA_MODEL::GetTheInstance().GetItem( ii );
dataItem->SyncDrawItems( nullptr, aView );
if( ii == m_selectedDataItem && m_selectedDrawItem < dataItem->GetDrawItems().size() )
if( ii == m_selectedDataItem && m_selectedDrawItem < (int)dataItem->GetDrawItems().size() )
{
WS_DRAW_ITEM_BASE* drawItem = dataItem->GetDrawItems()[ m_selectedDrawItem ];
drawItem->SetSelected();

View File

@ -127,7 +127,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
KIGFX::VIEW_CONTROLS* controls = getViewControls();
controls->SetSnapping( true );
VECTOR2I originalCursorPos = controls->GetCursorPosition();
bool moveMode;
bool moveMode = true; // For move item option. Alternate option is drag
m_anchorPoint.reset();
@ -187,7 +187,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
{
controls->SetSnapping( !evt->Modifier( MD_ALT ) );
if( evt->IsAction( &EE_ACTIONS::moveActivate )
if( evt->IsAction( &EE_ACTIONS::moveActivate )
|| evt->IsAction( &EE_ACTIONS::move ) || evt->IsAction( &EE_ACTIONS::drag )
|| evt->IsMotion() || evt->IsDrag( BUT_LEFT )
|| evt->IsAction( &EE_ACTIONS::refreshPreview ) )
@ -444,7 +444,7 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
if( restore_state )
{
m_frame->RollbackSchematicFromUndo();
if( unselect )
{
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );