From 810f668d458e92fbb3ffc1d26c2278af728faf9f Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 14 Jun 2020 06:53:12 -0700 Subject: [PATCH] Fix compile error Reading integer config values are implicitly cast and need to be specified. --- common/settings/app_settings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/settings/app_settings.cpp b/common/settings/app_settings.cpp index 59ba41e67c..8023e267a3 100644 --- a/common/settings/app_settings.cpp +++ b/common/settings/app_settings.cpp @@ -216,7 +216,8 @@ bool APP_SETTINGS_BASE::migrateWindowConfig( wxConfigBase* aCfg, const std::stri if( aCfg->Read( aFrame + "PcbUserGrid_X", &x ) && aCfg->Read( aFrame + "PcbUserGrid_Y", &y ) ) { - EDA_UNITS u = (EDA_UNITS)aCfg->Read( aFrame + "PcbUserGrid_Unit", (int)EDA_UNITS::INCHES ); + EDA_UNITS u = static_cast( aCfg->ReadLong( aFrame + "PcbUserGrid_Unit", + static_cast( EDA_UNITS::INCHES ) ) ); ( *this )[PointerFromString( ".grid.user_grid_x" )] = StringFromValue( u, x, true, true ); ( *this )[PointerFromString( ".grid.user_grid_y" )] = StringFromValue( u, y, true, true );