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
@@ -3997,7 +3997,7 @@ int Fred_mission_save::save_objects()
39973997 // multiply docked
39983998 else {
39993999 // save all instances for all ships
4000- for (dock_instance* dock_ptr = Objects[shipp->objnum ].dock_list ; dock_ptr != NULL ;
4000+ for (dock_instance* dock_ptr = Objects[shipp->objnum ].dock_list ; dock_ptr != nullptr ;
40014001 dock_ptr = dock_ptr->next ) {
40024002 save_single_dock_instance (&Ships[i], dock_ptr);
40034003 }
@@ -4297,8 +4297,8 @@ int Fred_mission_save::save_players()
42974297
42984298 // make sure we have at least one dogfight weapon for each ship type in a dogfight mission
42994299 if (IS_MISSION_MULTI_DOGFIGHT && (num_dogfight_weapons != Team_data[i].num_ship_choices )) {
4300- for (int numErrors = 0 ; numErrors < static_cast < int >( dogfight_ships. size ()); numErrors++ ) {
4301- mprintf ((" Warning: Ship %s has no dogfight weapons allowed\n " , dogfight_ships[numErrors] .c_str ()));
4300+ for (const auto & d_ship : dogfight_ships) {
4301+ mprintf ((" Warning: Ship %s has no dogfight weapons allowed\n " , d_ship .c_str ()));
43024302 }
43034303 SCP_string msg =
43044304 " 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