Remove extra redirection from GetDesignSettings()

Now that m_designSettings is a unique_ptr, we can use the operator* to
get the reference to the element.
This commit is contained in:
Seth Hillbrand 2020-08-20 06:23:21 -07:00
parent 9e40db9faf
commit 2deefdd9ce
1 changed files with 3 additions and 8 deletions

View File

@ -536,13 +536,8 @@ public:
*/
BOARD_DESIGN_SETTINGS& GetDesignSettings() const
{
// remove const-ness with cast. TODO(snh): Make GetDesignSettings const
// NOTE(JE) If we want this to be const, it's going to have to involve making BOARD and
// everything else that relies on BOARD_DESIGN_SETTINGS aware of the PROJECT so that it
// can be retrieved from there. This will also currently require constructing BOARD with
// a valid PROJECT passed in to the ctor.
return const_cast<BOARD_DESIGN_SETTINGS&>( *m_designSettings.get() );
return *m_designSettings;
}
const ZONE_SETTINGS& GetZoneSettings() const override