7
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:
Seth Hillbrand 2025-01-29 08:17:27 -06:00
parent 683be91b60
commit 94444adb54

View File

@ -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;