Eliminate function-scope loop index variables

This makes all loop index variables local to their loop and
fixes some issue arising from the loop variables being present
through the whole function, such as using the wrong index variable.

In addition, there has been some reduction of code duplication in
the scenario editor.
This commit is contained in:
2016-08-21 00:46:40 -04:00
parent d2ec3ff8c5
commit 9363ab2fcf
47 changed files with 1629 additions and 2111 deletions

View File

@@ -1,7 +1,9 @@
#include "location.hpp" // for sign_loc_t
void edit_placed_monst(short which_m);
cTownperson edit_placed_monst_adv(cTownperson monst_record, short which, class cDialog& parent);
void edit_sign(short which_sign,short picture);
void edit_sign(sign_loc_t& which_sign,short num,short picture);
short pick_town_num(std::string which_dlog,short def,cScenario& scenario);
bool change_ter(short& change_from,short& change_to,short& chance);
void edit_out_wand(short mode);