mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Don't take references to casts
We don't really save cycles and this can lead to unexpected behavior when the compiler decides that the sizes of the two types are different
This commit is contained in:
parent
683be91b60
commit
94444adb54
@ -347,7 +347,7 @@ bool PAD::FlashLayer( int aLayer, bool aOnlyCheckIfPermitted ) const
|
||||
if( aLayer > PCB_LAYER_ID_COUNT )
|
||||
return true;
|
||||
|
||||
const PCB_LAYER_ID& layer = static_cast<PCB_LAYER_ID>( aLayer );
|
||||
PCB_LAYER_ID layer = static_cast<PCB_LAYER_ID>( aLayer );
|
||||
|
||||
if( !IsOnLayer( layer ) )
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user