From 33328fb864b43aefaafcb4429cada8f10e81895b Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 18 Oct 2024 13:35:22 -0700 Subject: [PATCH] Minor formatting fixes --- common/widgets/mathplot.cpp | 10 +++++----- eeschema/sch_painter.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/widgets/mathplot.cpp b/common/widgets/mathplot.cpp index b3c2232a49..1040e35e05 100644 --- a/common/widgets/mathplot.cpp +++ b/common/widgets/mathplot.cpp @@ -1808,7 +1808,7 @@ void mpWindow::ZoomOut( const wxPoint& centerPoint, double zoomFactor, wxOrienta void mpWindow::ZoomRect( wxPoint p0, wxPoint p1 ) { - pushZoomUndo( { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } ); + pushZoomUndo( { { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } } ); // Constrain given rectangle to plot area const int pMinX = m_marginLeft; @@ -1869,7 +1869,7 @@ void mpWindow::ZoomUndo() { if( m_undoZoomStack.size() ) { - m_redoZoomStack.push( { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } ); + m_redoZoomStack.push( { { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } } ); std::array zoom = m_undoZoomStack.top(); m_undoZoomStack.pop(); @@ -1884,7 +1884,7 @@ void mpWindow::ZoomRedo() { if( m_redoZoomStack.size() ) { - m_undoZoomStack.push( { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } ); + m_undoZoomStack.push( { { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } } ); std::array zoom = m_redoZoomStack.top(); m_redoZoomStack.pop(); @@ -1909,7 +1909,7 @@ void mpWindow::OnShowPopupMenu( wxMouseEvent& event ) void mpWindow::OnFit( wxCommandEvent& WXUNUSED( event ) ) { - pushZoomUndo( { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } ); + pushZoomUndo( { { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } } ); Fit(); } @@ -2093,7 +2093,7 @@ void mpWindow::DoZoom( const wxPoint& centerPoint, double zoomFactor, wxOrientat const bool horizontally = ( directions & wxHORIZONTAL ) != 0; const bool vertically = ( directions & wxVERTICAL ) != 0; - pushZoomUndo( { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } ); + pushZoomUndo( { { m_desiredXmin, m_desiredXmax, m_desiredYmin, m_desiredYmax } } ); // Preserve the position of the clicked point: wxPoint c( centerPoint ); diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index b72183380e..565b516b9a 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1027,7 +1027,7 @@ public: { } - const bool ShouldDraw() const + bool ShouldDraw() const { return size > 0 && colour != COLOR4D::UNSPECIFIED && !text.IsEmpty(); } @@ -1040,7 +1040,7 @@ public: }; PIN_TEXTS( const SCH_PIN& aPin, float aPenWidth, float aPinTextMargin ) : - m_pin( aPin ), m_offsets{ 0, 0, 0, 0 }, m_penWidth( aPenWidth ), + m_pin( aPin ), m_offsets( { { 0, 0, 0, 0 } } ), m_penWidth( aPenWidth ), m_pinTextMargin( aPinTextMargin ) { } @@ -1055,7 +1055,7 @@ public: SLOT& GetSlot( SLOT_ID aSlot ) { return m_slots[aSlot]; } const SLOT& GetSlot( SLOT_ID aSlot ) const { return m_slots[aSlot]; } - const void ComputeOffsets() + void ComputeOffsets() { float textOffset = m_pin.GetParentSymbol()->GetPinNameOffset();