Changeset - r23024:29d5f833c1b9
[Not reviewed]
master
0 7 0
Charles Pigott - 6 years ago 2018-10-14 17:17:09
charlespigott@googlemail.com
Fix: Remove various dead or unnecessary assignments
7 files changed with 8 insertions and 15 deletions:
0 comments (0 inline, 0 general)
src/gfx_layout.cpp
Show inline comments
 
@@ -498,11 +498,6 @@ const ParagraphLayouter::Line *FallbackP
 
		return l;
 
	}
 

	
 
	const WChar *begin = this->buffer;
 
	const WChar *last_space = NULL;
 
	const WChar *last_char = begin;
 
	int width = 0;
 

	
 
	int offset = this->buffer - this->buffer_begin;
 
	FontMap::iterator iter = this->runs.Begin();
 
	while (iter->first <= offset) {
 
@@ -513,6 +508,10 @@ const ParagraphLayouter::Line *FallbackP
 
	const FontCache *fc = iter->second->fc;
 
	const WChar *next_run = this->buffer_begin + iter->first;
 

	
 
	const WChar *begin = this->buffer;
 
	const WChar *last_space = NULL;
 
	const WChar *last_char;
 
	int width = 0;
 
	for (;;) {
 
		WChar c = *this->buffer;
 
		last_char = this->buffer;
src/industry_gui.cpp
Show inline comments
 
@@ -508,7 +508,6 @@ public:
 
				y += FONT_HEIGHT_NORMAL;
 

	
 
				/* Get the additional purchase info text, if it has not already been queried. */
 
				str = STR_NULL;
 
				if (HasBit(indsp->callback_mask, CBM_IND_FUND_MORE_TEXT)) {
 
					uint16 callback_res = GetIndustryCallback(CBID_INDUSTRY_FUND_MORE_TEXT, 0, 0, NULL, this->selected_type, INVALID_TILE);
 
					if (callback_res != CALLBACK_FAILED && callback_res != 0x400) {
src/newgrf.cpp
Show inline comments
 
@@ -3472,8 +3472,6 @@ static ChangeInfoResult IndustriesChange
 
								} else {
 
									/* Declared as been valid, can be used */
 
									itt[k].gfx = tempid;
 
									size = k + 1;
 
									copy_from = itt;
 
								}
 
							} else if (itt[k].gfx == 0xFF) {
 
								itt[k].ti.x = (int8)GB(itt[k].ti.x, 0, 8);
 
@@ -3787,8 +3785,6 @@ static ChangeInfoResult AirportChangeInf
 
								} else {
 
									/* Declared as been valid, can be used */
 
									att[k].gfx = tempid;
 
									size = k + 1;
 
									copy_from = att;
 
								}
 
							} else if (att[k].gfx == 0xFF) {
 
								att[k].ti.x = (int8)GB(att[k].ti.x, 0, 8);
src/saveload/oldloader.cpp
Show inline comments
 
@@ -265,7 +265,7 @@ static SavegameType DetermineOldSavegame
 
			case SGT_TTD: title = strecpy(title, "(TTD) ", last);    break;
 
			default:      title = strecpy(title, "(broken) ", last); break;
 
		}
 
		title = strecpy(title, temp, last);
 
		strecpy(title, temp, last);
 
	}
 

	
 
	return type;
src/script/script_info_dummy.cpp
Show inline comments
 
@@ -92,7 +92,7 @@ void Script_CreateDummy(HSQUIRRELVM vm, 
 
		p = newline + 1;
 
	} while (newline != NULL);
 

	
 
	dp = strecpy(dp, "  }\n}\n", lastof(dummy_script));
 
	strecpy(dp, "  }\n}\n", lastof(dummy_script));
 

	
 
	/* 3) We translate the error message in the character format that Squirrel wants.
 
	 *    We can use the fact that the wchar string printing also uses %s to print
src/string.cpp
Show inline comments
 
@@ -170,7 +170,7 @@ void str_fix_scc_encoded(char *str, cons
 
		if ((len == 0 && str + 4 > last) || str + len > last) break;
 

	
 
		WChar c;
 
		len = Utf8Decode(&c, str);
 
		Utf8Decode(&c, str);
 
		if (c == '\0') break;
 

	
 
		if (c == 0xE028 || c == 0xE02A) {
src/strings.cpp
Show inline comments
 
@@ -818,7 +818,6 @@ static char *FormatString(char *buff, co
 
				sub_args.ClearTypeInformation();
 
				memset(sub_args_need_free, 0, sizeof(sub_args_need_free));
 

	
 
				const char *s = str;
 
				char *p;
 
				uint32 stringid = strtoul(str, &p, 16);
 
				if (*p != ':' && *p != '\0') {
 
@@ -837,7 +836,7 @@ static char *FormatString(char *buff, co
 
				int i = 0;
 
				while (*p != '\0' && i < 20) {
 
					uint64 param;
 
					s = ++p;
 
					const char *s = ++p;
 

	
 
					/* Find the next value */
 
					bool instring = false;
0 comments (0 inline, 0 general)