@@ -133,7 +133,7 @@ void iwMapGenerator::Msg_ButtonClick(const unsigned ctrl_id)
133133
134134void iwMapGenerator::Apply ()
135135{
136- mapSettings.numPlayers = * GetCtrl<ctrlComboBox>(ID_cbNumPlayers)->GetSelection () + 2 ;
136+ mapSettings.numPlayers = GetCtrl<ctrlComboBox>(ID_cbNumPlayers)->GetSelection (). value () + 2 ;
137137 mapSettings.ratioGold = GetCtrl<ctrlProgress>(ID_pgGoldRatio)->GetPosition ();
138138 mapSettings.ratioIron = GetCtrl<ctrlProgress>(ID_pgIronRatio)->GetPosition ();
139139 mapSettings.ratioCoal = GetCtrl<ctrlProgress>(ID_pgCoalRatio)->GetPosition ();
@@ -142,14 +142,14 @@ void iwMapGenerator::Apply()
142142 mapSettings.trees = GetCtrl<ctrlProgress>(ID_pgTrees)->GetPosition ();
143143 mapSettings.stonePiles = GetCtrl<ctrlProgress>(ID_pgStonePiles)->GetPosition ();
144144
145- switch (* GetCtrl<ctrlComboBox>(ID_cbMountainDist)->GetSelection ())
145+ switch (GetCtrl<ctrlComboBox>(ID_cbMountainDist)->GetSelection (). value ())
146146 {
147147 case 0 : mapSettings.mountainDistance = MountainDistance::Close; break ;
148148 case 1 : mapSettings.mountainDistance = MountainDistance::Normal; break ;
149149 case 2 : mapSettings.mountainDistance = MountainDistance::Far; break ;
150150 case 3 : mapSettings.mountainDistance = MountainDistance::VeryFar; break ;
151151 }
152- switch (* GetCtrl<ctrlComboBox>(ID_cbMapStyle)->GetSelection ())
152+ switch (GetCtrl<ctrlComboBox>(ID_cbMapStyle)->GetSelection (). value ())
153153 {
154154 case 0 : mapSettings.style = MapStyle::Water; break ;
155155 case 1 : mapSettings.style = MapStyle::Land; break ;
@@ -159,7 +159,7 @@ void iwMapGenerator::Apply()
159159 s25util::fromStringClassic<unsigned >(GetCtrl<ctrlComboBox>(ID_cbMapSizeX)->GetSelectedText ().value_or (" 128" ));
160160 mapSettings.size .y =
161161 s25util::fromStringClassic<unsigned >(GetCtrl<ctrlComboBox>(ID_cbMapSizeY)->GetSelectedText ().value_or (" 128" ));
162- switch (* GetCtrl<ctrlComboBox>(ID_cbIslands)->GetSelection ())
162+ switch (GetCtrl<ctrlComboBox>(ID_cbIslands)->GetSelection (). value ())
163163 {
164164 case 0 : mapSettings.islands = IslandAmount::Few; break ;
165165 case 1 : mapSettings.islands = IslandAmount::Normal; break ;
0 commit comments