Fix more C5266 warnings

This commit is contained in:
Marek Roszko 2023-05-18 22:05:12 -04:00
parent 573b66d243
commit 3bf2fb2c0e
7 changed files with 17 additions and 17 deletions

View File

@ -84,27 +84,27 @@ private:
*/ */
int winding( const GLYPH_POINTS& aContour ) const; int winding( const GLYPH_POINTS& aContour ) const;
inline static const unsigned int onCurve( char aTags ) inline static unsigned int onCurve( char aTags )
{ {
return aTags & 0x1; return aTags & 0x1;
} }
inline static const unsigned int thirdOrderBezierPoint( char aTags ) inline static unsigned int thirdOrderBezierPoint( char aTags )
{ {
return onCurve( aTags ) ? 0 : aTags & 0x2; return onCurve( aTags ) ? 0 : aTags & 0x2;
} }
inline static const unsigned int secondOrderBezierPoint( char aTags ) inline static unsigned int secondOrderBezierPoint( char aTags )
{ {
return onCurve( aTags ) ? 0 : !thirdOrderBezierPoint( aTags ); return onCurve( aTags ) ? 0 : !thirdOrderBezierPoint( aTags );
} }
inline static const unsigned int hasDropout( char aTags ) inline static unsigned int hasDropout( char aTags )
{ {
return aTags & 0x4; return aTags & 0x4;
} }
inline static const unsigned int dropoutMode( char aTags ) inline static unsigned int dropoutMode( char aTags )
{ {
return hasDropout( aTags ) ? ( aTags & 0x38 ) : 0; return hasDropout( aTags ) ? ( aTags & 0x38 ) : 0;
} }

View File

@ -661,7 +661,7 @@ public:
return false; return false;
} }
const T ToEnum( const wxString value ) T ToEnum( const wxString value )
{ {
if( m_reverseMap.count( value ) ) if( m_reverseMap.count( value ) )
return m_reverseMap[ value ]; return m_reverseMap[ value ];

View File

@ -698,7 +698,7 @@ public:
/** /**
* Return the ID of a layer. * Return the ID of a layer.
*/ */
const PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const; PCB_LAYER_ID GetLayerID( const wxString& aLayerName ) const;
/** /**
* Return the name of a \a aLayer. * Return the name of a \a aLayer.

View File

@ -100,7 +100,7 @@ public:
const VECTOR2I GetSourcePos() const { return m_source->Pos(); } const VECTOR2I GetSourcePos() const { return m_source->Pos(); }
const VECTOR2I GetTargetPos() const { return m_target->Pos(); } const VECTOR2I GetTargetPos() const { return m_target->Pos(); }
const unsigned GetLength() const unsigned GetLength() const
{ {
return ( m_target->Pos() - m_source->Pos() ).EuclideanNorm(); return ( m_target->Pos() - m_source->Pos() ).EuclideanNorm();
} }

View File

@ -80,7 +80,7 @@ public:
m_pos += aPos; m_pos += aPos;
} }
const unsigned int Dist( const CN_ANCHOR& aSecond ) unsigned int Dist( const CN_ANCHOR& aSecond )
{ {
return ( m_pos - aSecond.Pos() ).EuclideanNorm(); return ( m_pos - aSecond.Pos() ).EuclideanNorm();
} }

View File

@ -721,7 +721,7 @@ public:
void SetDoNotAllowPads( bool aEnable ) { m_doNotAllowPads = aEnable; } void SetDoNotAllowPads( bool aEnable ) { m_doNotAllowPads = aEnable; }
void SetDoNotAllowFootprints( bool aEnable ) { m_doNotAllowFootprints = aEnable; } void SetDoNotAllowFootprints( bool aEnable ) { m_doNotAllowFootprints = aEnable; }
const ISLAND_REMOVAL_MODE GetIslandRemovalMode() const { return m_islandRemovalMode; } ISLAND_REMOVAL_MODE GetIslandRemovalMode() const { return m_islandRemovalMode; }
void SetIslandRemovalMode( ISLAND_REMOVAL_MODE aRemove ) { m_islandRemovalMode = aRemove; } void SetIslandRemovalMode( ISLAND_REMOVAL_MODE aRemove ) { m_islandRemovalMode = aRemove; }
long long int GetMinIslandArea() const { return m_minIslandArea; } long long int GetMinIslandArea() const { return m_minIslandArea; }

View File

@ -175,12 +175,12 @@ public:
/** /**
* Accessors to parameters used in Rule Area zones: * Accessors to parameters used in Rule Area zones:
*/ */
const bool GetIsRuleArea() const { return m_isRuleArea; } bool GetIsRuleArea() const { return m_isRuleArea; }
const bool GetDoNotAllowCopperPour() const { return m_keepoutDoNotAllowCopperPour; } bool GetDoNotAllowCopperPour() const { return m_keepoutDoNotAllowCopperPour; }
const bool GetDoNotAllowVias() const { return m_keepoutDoNotAllowVias; } bool GetDoNotAllowVias() const { return m_keepoutDoNotAllowVias; }
const bool GetDoNotAllowTracks() const { return m_keepoutDoNotAllowTracks; } bool GetDoNotAllowTracks() const { return m_keepoutDoNotAllowTracks; }
const bool GetDoNotAllowPads() const { return m_keepoutDoNotAllowPads; } bool GetDoNotAllowPads() const { return m_keepoutDoNotAllowPads; }
const bool GetDoNotAllowFootprints() const { return m_keepoutDoNotAllowFootprints; } bool GetDoNotAllowFootprints() const { return m_keepoutDoNotAllowFootprints; }
void SetIsRuleArea( bool aEnable ) { m_isRuleArea = aEnable; } void SetIsRuleArea( bool aEnable ) { m_isRuleArea = aEnable; }
void SetDoNotAllowCopperPour( bool aEnable ) { m_keepoutDoNotAllowCopperPour = aEnable; } void SetDoNotAllowCopperPour( bool aEnable ) { m_keepoutDoNotAllowCopperPour = aEnable; }
@ -189,7 +189,7 @@ public:
void SetDoNotAllowPads( bool aEnable ) { m_keepoutDoNotAllowPads = aEnable; } void SetDoNotAllowPads( bool aEnable ) { m_keepoutDoNotAllowPads = aEnable; }
void SetDoNotAllowFootprints( bool aEnable ) { m_keepoutDoNotAllowFootprints = aEnable; } void SetDoNotAllowFootprints( bool aEnable ) { m_keepoutDoNotAllowFootprints = aEnable; }
const ISLAND_REMOVAL_MODE GetIslandRemovalMode() const { return m_removeIslands; } ISLAND_REMOVAL_MODE GetIslandRemovalMode() const { return m_removeIslands; }
void SetIslandRemovalMode( ISLAND_REMOVAL_MODE aRemove ) { m_removeIslands = aRemove; } void SetIslandRemovalMode( ISLAND_REMOVAL_MODE aRemove ) { m_removeIslands = aRemove; }
long long int GetMinIslandArea() const { return m_minIslandArea; } long long int GetMinIslandArea() const { return m_minIslandArea; }