Changeset - r23888:d7b5dd8f5077
[Not reviewed]
master
0 1 0
glx22 - 5 years ago 2019-10-25 23:34:19
glx22@users.noreply.github.com
Fix 53f8d0b81: signed/unsigned warnings (#7803)
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -2019,7 +2019,7 @@ CommandCost CmdBuildIndustry(TileIndex t
 
					/* Start with a random layout */
 
					size_t layout = RandomRange((uint32)num_layouts);
 
					/* Check now each layout, starting with the random one */
 
					for (int j = 0; j < num_layouts; j++) {
 
					for (size_t j = 0; j < num_layouts; j++) {
 
						layout = (layout + 1) % num_layouts;
 
						ret = CreateNewIndustryHelper(tile, it, flags, indspec, layout, random_var8f, random_initial_bits, cur_company.GetOriginalValue(), _current_company == OWNER_DEITY ? IACT_RANDOMCREATION : IACT_PROSPECTCREATION, &ind);
 
						if (ret.Succeeded()) break;
 
@@ -2030,11 +2030,11 @@ CommandCost CmdBuildIndustry(TileIndex t
 
			cur_company.Restore();
 
		}
 
	} else {
 
		int layout = GB(p1, 8, 8);
 
		size_t layout = GB(p1, 8, 8);
 
		if (layout >= num_layouts) return CMD_ERROR;
 

	
 
		/* Check subsequently each layout, starting with the given layout in p1 */
 
		for (int i = 0; i < num_layouts; i++) {
 
		for (size_t i = 0; i < num_layouts; i++) {
 
			layout = (layout + 1) % num_layouts;
 
			ret = CreateNewIndustryHelper(tile, it, flags, indspec, layout, random_var8f, random_initial_bits, _current_company, _current_company == OWNER_DEITY ? IACT_RANDOMCREATION : IACT_USERCREATION, &ind);
 
			if (ret.Succeeded()) break;
0 comments (0 inline, 0 general)