Use static casts between related classes.
This commit is contained in:
parent
751aef4e23
commit
3b261256e7
|
@ -1389,15 +1389,14 @@ static struct ZONE_DESC
|
||||||
propMgr.InheritsAfter( TYPE_HASH( ZONE ), TYPE_HASH( BOARD_CONNECTED_ITEM ) );
|
propMgr.InheritsAfter( TYPE_HASH( ZONE ), TYPE_HASH( BOARD_CONNECTED_ITEM ) );
|
||||||
|
|
||||||
// Mask layer and position properties; they aren't useful in current form
|
// Mask layer and position properties; they aren't useful in current form
|
||||||
auto posX = new PROPERTY<ZONE, int>( _HKI( "Position X" ),
|
auto posX = new PROPERTY<ZONE, int>( _HKI( "Position X" ), NO_SETTER( ZONE, int ),
|
||||||
NO_SETTER( ZONE, int ),
|
static_cast<int ( ZONE::* )() const>( &ZONE::GetX ),
|
||||||
reinterpret_cast<int (ZONE::*)() const>( &ZONE::GetX ),
|
|
||||||
PROPERTY_DISPLAY::PT_COORD,
|
PROPERTY_DISPLAY::PT_COORD,
|
||||||
ORIGIN_TRANSFORMS::ABS_X_COORD );
|
ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||||
posX->SetIsHiddenFromPropertiesManager();
|
posX->SetIsHiddenFromPropertiesManager();
|
||||||
|
|
||||||
auto posY = new PROPERTY<ZONE, int>( _HKI( "Position Y" ), NO_SETTER( ZONE, int ),
|
auto posY = new PROPERTY<ZONE, int>( _HKI( "Position Y" ), NO_SETTER( ZONE, int ),
|
||||||
reinterpret_cast<int (ZONE::*)() const>( &ZONE::GetY ),
|
static_cast<int ( ZONE::* )() const>( &ZONE::GetY ),
|
||||||
PROPERTY_DISPLAY::PT_COORD,
|
PROPERTY_DISPLAY::PT_COORD,
|
||||||
ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||||
posY->SetIsHiddenFromPropertiesManager();
|
posY->SetIsHiddenFromPropertiesManager();
|
||||||
|
|
Loading…
Reference in New Issue