From d0023add810b88ff7546a9899ee4647f14822c6f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 3 Jun 2022 22:30:43 +0100 Subject: [PATCH] Code clarity. --- common/eda_text.cpp | 18 +++++++++--------- include/eda_text.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/eda_text.cpp b/common/eda_text.cpp index e31cadb7ab..5e1407e8bc 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -294,24 +294,24 @@ void EDA_TEXT::SwapAttributes( EDA_TEXT& aTradingPartner ) } -int EDA_TEXT::GetEffectiveTextPenWidth( int aDefaultWidth ) const +int EDA_TEXT::GetEffectiveTextPenWidth( int aDefaultPenWidth ) const { - int width = GetTextThickness(); + int penWidth = GetTextThickness(); - if( width <= 1 ) + if( penWidth <= 1 ) { - width = aDefaultWidth; + penWidth = aDefaultPenWidth; if( IsBold() ) - width = GetPenSizeForBold( GetTextWidth() ); - else if( width <= 1 ) - width = GetPenSizeForNormal( GetTextWidth() ); + penWidth = GetPenSizeForBold( GetTextWidth() ); + else if( penWidth <= 1 ) + penWidth = GetPenSizeForNormal( GetTextWidth() ); } // Clip pen size for small texts: - width = Clamp_Text_PenSize( width, GetTextSize(), ALLOW_BOLD_THICKNESS ); + penWidth = Clamp_Text_PenSize( penWidth, GetTextSize(), ALLOW_BOLD_THICKNESS ); - return width; + return penWidth; } diff --git a/include/eda_text.h b/include/eda_text.h index 3b30969652..3cdf7011d8 100644 --- a/include/eda_text.h +++ b/include/eda_text.h @@ -120,9 +120,9 @@ public: int GetTextThickness() const { return m_attributes.m_StrokeWidth; }; /** - * The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth. + * The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth. */ - int GetEffectiveTextPenWidth( int aDefaultWidth = 0 ) const; + int GetEffectiveTextPenWidth( int aDefaultPenWidth = 0 ) const; virtual void SetTextAngle( const EDA_ANGLE& aAngle ); const EDA_ANGLE& GetTextAngle() const { return m_attributes.m_Angle; }