From 21c752fa0b63946fe1d5e89310f6bb4994099701 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 1 Jun 2020 09:58:07 -0700 Subject: [PATCH] eeschema: Rename shadowing var --- eeschema/dialogs/dialog_edit_one_field.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_one_field.cpp b/eeschema/dialogs/dialog_edit_one_field.cpp index 20946a0b48..8b4d2389f5 100644 --- a/eeschema/dialogs/dialog_edit_one_field.cpp +++ b/eeschema/dialogs/dialog_edit_one_field.cpp @@ -294,23 +294,23 @@ void DIALOG_SCH_EDIT_ONE_FIELD::onScintillaCharAdded( wxStyledTextEvent &aEvent wxString partial; auto textVarRef = - [&]( int pos ) + [&]( int pt ) { - return pos >= 2 - && m_StyledTextCtrl->GetCharAt( pos-2 ) == '$' - && m_StyledTextCtrl->GetCharAt( pos-1 ) == '{'; + return pt >= 2 + && m_StyledTextCtrl->GetCharAt( pt - 2 ) == '$' + && m_StyledTextCtrl->GetCharAt( pt - 1 ) == '{'; }; // Check for cross-reference - if( start > 1 && m_StyledTextCtrl->GetCharAt( start-1 ) == ':' ) + if( start > 1 && m_StyledTextCtrl->GetCharAt( start - 1 ) == ':' ) { - int refStart = m_StyledTextCtrl->WordStartPosition( start-1, true ); + int refStart = m_StyledTextCtrl->WordStartPosition( start - 1, true ); if( textVarRef( refStart ) ) { partial = m_StyledTextCtrl->GetRange( start, pos ); - wxString ref = m_StyledTextCtrl->GetRange( refStart, start-1 ); + wxString ref = m_StyledTextCtrl->GetRange( refStart, start - 1 ); SCH_SHEET_LIST sheets = editFrame->Schematic().GetSheets(); SCH_REFERENCE_LIST refs; SCH_COMPONENT* refComponent = nullptr;