File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ void Fred_mission_save::convert_special_tags_to_retail(SCP_string& text)
139139 replace_all (text, " $semicolon" , " ," );
140140}
141141
142- void Fred_mission_save::convert_special_tags_to_retail ()
142+ void Fred_mission_save::convert_special_tags_to_retail () const
143143{
144144 int i, team, stage;
145145
@@ -3993,7 +3993,7 @@ int Fred_mission_save::save_objects()
39933993 // multiply docked
39943994 else {
39953995 // save all instances for all ships
3996- for (dock_instance* dock_ptr = Objects[shipp->objnum ].dock_list ; dock_ptr != NULL ;
3996+ for (dock_instance* dock_ptr = Objects[shipp->objnum ].dock_list ; dock_ptr != nullptr ;
39973997 dock_ptr = dock_ptr->next ) {
39983998 save_single_dock_instance (&Ships[i], dock_ptr);
39993999 }
@@ -4293,8 +4293,8 @@ int Fred_mission_save::save_players()
42934293
42944294 // make sure we have at least one dogfight weapon for each ship type in a dogfight mission
42954295 if (IS_MISSION_MULTI_DOGFIGHT && (num_dogfight_weapons != Team_data[i].num_ship_choices )) {
4296- for (int numErrors = 0 ; numErrors < static_cast < int >( dogfight_ships. size ()); numErrors++ ) {
4297- mprintf ((" Warning: Ship %s has no dogfight weapons allowed\n " , dogfight_ships[numErrors] .c_str ()));
4296+ for (const auto & d_ship : dogfight_ships) {
4297+ mprintf ((" Warning: Ship %s has no dogfight weapons allowed\n " , d_ship .c_str ()));
42984298 }
42994299 SCP_string msg =
43004300 " This mission is a dogfight mission but no dogfight weapons are available for at least one ship in the "
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ class Fred_mission_save {
204204 * @brief Converts $escaped tags into their retail equivalent
205205 * @author Goober5000
206206 */
207- void convert_special_tags_to_retail ();
207+ void convert_special_tags_to_retail () const ;
208208
209209 /* *
210210 * @brief Converts $escaped tags in the given cstring
You can’t perform that action at this time.
0 commit comments