Changeset - r22672:3473f7daf422
[Not reviewed]
master
0 60 0
frosch - 7 years ago 2017-08-13 18:38:42
frosch@openttd.org
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
60 files changed with 221 insertions and 121 deletions:
0 comments (0 inline, 0 general)
src/3rdparty/squirrel/squirrel/sqvm.cpp
Show inline comments
 
@@ -215,7 +215,7 @@ bool SQVM::ObjCmp(const SQObjectPtr &o1,
 
					_RET_SUCCEED(_integer(res))
 
				}
 
			}
 
			//continues through (no break needed)
 
			FALLTHROUGH;
 
		default:
 
			_RET_SUCCEED( _userpointer(o1) < _userpointer(o2)?-1:1 );
 
		}
 
@@ -287,6 +287,7 @@ void SQVM::ToString(const SQObjectPtr &o
 
				//else keeps going to the default
 
			}
 
		}
 
		FALLTHROUGH;
 
	default:
 
		seprintf(buf, lastof(buf),"(%s : 0x%p)",GetTypeName(o),(void*)_rawval(o));
 
	}
 
@@ -539,7 +540,7 @@ bool SQVM::FOREACH_OP(SQObjectPtr &o1,SQ
 
			_generator(o1)->Resume(this, arg_2+1);
 
			_FINISH(0);
 
		}
 
		/* FALL THROUGH */
 
		FALLTHROUGH;
 
	default:
 
		Raise_Error("cannot iterate %s", GetTypeName(o1));
 
	}
 
@@ -769,7 +770,7 @@ exception_restore:
 
					ct_stackbase = _stackbase;
 
					goto common_call;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 
			case _OP_CALL: {
 
					ct_tailcall = false;
 
					ct_target = arg0;
 
@@ -1330,7 +1331,7 @@ bool SQVM::Set(const SQObjectPtr &self,c
 
				return true;
 
			}
 
		}
 
		//keeps going
 
		FALLTHROUGH;
 
	case OT_USERDATA:
 
		if(_delegable(self)->_delegate) {
 
			SQObjectPtr t;
src/ai/ai_scanner.cpp
Show inline comments
 
@@ -114,7 +114,7 @@ AIInfo *AIScannerInfo::FindInfo(const ch
 
		*e = '\0';
 
		e++;
 
		versionParam = atoi(e);
 
		/* FALL THROUGH, like we were calling this function with a version. */
 
		/* Continue, like we were calling this function with a version. */
 
	}
 

	
 
	if (force_exact_match) {
src/company_cmd.cpp
Show inline comments
 
@@ -162,7 +162,7 @@ static bool IsValidCompanyManagerFace(Co
 
	for (CompanyManagerFaceVariable cmfv = CMFV_CHEEKS; cmfv < CMFV_END; cmfv++) {
 
		switch (cmfv) {
 
			case CMFV_MOUSTACHE:   if (!has_moustache)   continue; break;
 
			case CMFV_LIPS:        // FALL THROUGH
 
			case CMFV_LIPS:
 
			case CMFV_NOSE:        if (has_moustache)    continue; break;
 
			case CMFV_TIE_EARRING: if (!has_tie_earring) continue; break;
 
			case CMFV_GLASSES:     if (!has_glasses)     continue; break;
src/company_gui.cpp
Show inline comments
 
@@ -318,7 +318,8 @@ struct CompanyFinancesWindow : Window {
 
			case WID_CF_EXPS_PRICE2:
 
			case WID_CF_EXPS_PRICE3:
 
				size->height = _expenses_list_types[type].GetHeight();
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case WID_CF_BALANCE_VALUE:
 
			case WID_CF_LOAN_VALUE:
 
			case WID_CF_TOTAL_VALUE:
 
@@ -636,7 +637,8 @@ public:
 
					size->width = 0;
 
					break;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case WID_SCL_PRI_COL_DROPDOWN: {
 
				int padding = this->square.width + NWidgetScrollbar::GetVerticalDimension().width + 10;
 
				for (const StringID *id = _colour_dropdown; id != endof(_colour_dropdown); id++) {
 
@@ -892,7 +894,7 @@ void DrawCompanyManagerFace(CompanyManag
 
	for (CompanyManagerFaceVariable cmfv = CMFV_CHEEKS; cmfv < CMFV_END; cmfv++) {
 
		switch (cmfv) {
 
			case CMFV_MOUSTACHE:   if (!has_moustache)   continue; break;
 
			case CMFV_LIPS:        // FALL THROUGH
 
			case CMFV_LIPS:
 
			case CMFV_NOSE:        if (has_moustache)    continue; break;
 
			case CMFV_TIE_EARRING: if (!has_tie_earring) continue; break;
 
			case CMFV_GLASSES:     if (!has_glasses)     continue; break;
 
@@ -1365,7 +1367,7 @@ public:
 
			/* OK button */
 
			case WID_SCMF_ACCEPT:
 
				DoCommandP(0, 0, this->face, CMD_SET_COMPANY_MANAGER_FACE);
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			/* Cancel button */
 
			case WID_SCMF_CANCEL:
src/console.cpp
Show inline comments
 
@@ -468,7 +468,7 @@ void IConsoleCmdExec(const char *cmdstr)
 
				tokenstream[tstream_i++] = *++cmdptr;
 
				break;
 
			}
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 
		default: // Normal character
 
			tokenstream[tstream_i++] = *cmdptr;
 

	
src/depot_gui.cpp
Show inline comments
 
@@ -445,7 +445,8 @@ struct DepotWindow : Window {
 
			switch (this->type) {
 
				case VEH_TRAIN:
 
					if (wagon) return MODE_ERROR;
 
					/* FALL THROUGH */
 
					FALLTHROUGH;
 

	
 
				case VEH_ROAD:
 
					if (xm <= this->flag_width) return MODE_START_STOP;
 
					break;
src/economy.cpp
Show inline comments
 
@@ -1726,7 +1726,7 @@ static void LoadUnloadVehicle(Vehicle *f
 
		/* update stats */
 
		int t;
 
		switch (front->type) {
 
			case VEH_TRAIN: /* FALL THROUGH */
 
			case VEH_TRAIN:
 
			case VEH_SHIP:
 
				t = front->vcache.cached_max_speed;
 
				break;
src/engine_gui.cpp
Show inline comments
 
@@ -126,7 +126,7 @@ struct EnginePreviewWindow : Window {
 
		switch (widget) {
 
			case WID_EP_YES:
 
				DoCommandP(0, this->window_number, 0, CMD_WANT_ENGINE_PREVIEW);
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 
			case WID_EP_NO:
 
				if (!_shift_pressed) delete this;
 
				break;
src/fileio.cpp
Show inline comments
 
@@ -522,7 +522,7 @@ FILE *FioFOpenFile(const char *filename,
 
			case BASESET_DIR:
 
				f = FioFOpenFile(filename, mode, OLD_GM_DIR, filesize);
 
				if (f != NULL) break;
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 
			case NEWGRF_DIR:
 
				f = FioFOpenFile(filename, mode, OLD_DATA_DIR, filesize);
 
				break;
 
@@ -1477,7 +1477,7 @@ uint FileScanner::Scan(const char *exten
 
	switch (sd) {
 
		case BASESET_DIR:
 
			num += this->Scan(extension, OLD_GM_DIR, tars, recursive);
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 
		case NEWGRF_DIR:
 
			num += this->Scan(extension, OLD_DATA_DIR, tars, recursive);
 
			break;
src/fios.cpp
Show inline comments
 
@@ -158,7 +158,8 @@ const char *FiosBrowseTo(const FiosItem 
 
#elif defined(WIN32) || defined(__OS2__)
 
			seprintf(_fios_path, _fios_path_last, "%c:" PATHSEP, item->title[0]);
 
#endif
 
			/* FALL THROUGH */
 
			break;
 

	
 
		case FIOS_TYPE_INVALID:
 
			break;
 

	
src/fios_gui.cpp
Show inline comments
 
@@ -702,7 +702,8 @@ public:
 
				this->vscroll->SetCount(this->fios_items.Length());
 
				this->selected = NULL;
 
				_load_check_data.Clear();
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case 1:
 
				/* Selection changes */
 
				if (!gui_scope) break;
src/fontcache.cpp
Show inline comments
 
@@ -126,7 +126,7 @@ void SpriteFontCache::InitializeUnicodeG
 
	SpriteID base;
 
	switch (this->fs) {
 
		default: NOT_REACHED();
 
		case FS_MONO:   // Use normal as default for mono spaced font, i.e. FALL THROUGH
 
		case FS_MONO:   // Use normal as default for mono spaced font
 
		case FS_NORMAL: base = SPR_ASCII_SPACE;       break;
 
		case FS_SMALL:  base = SPR_ASCII_SPACE_SMALL; break;
 
		case FS_LARGE:  base = SPR_ASCII_SPACE_BIG;   break;
src/game/game_scanner.cpp
Show inline comments
 
@@ -55,7 +55,7 @@ GameInfo *GameScannerInfo::FindInfo(cons
 
		*e = '\0';
 
		e++;
 
		versionParam = atoi(e);
 
		/* FALL THROUGH, like we were calling this function with a version. */
 
		/* Continue like we were calling this function with a version. */
 
	}
 

	
 
	if (force_exact_match) {
src/industry_gui.cpp
Show inline comments
 
@@ -785,7 +785,7 @@ public:
 
						DrawString(left_side, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_ACCEPT_CARGO_AMOUNT);
 
						break;
 
					}
 
					/* FALL THROUGH */
 
					FALLTHROUGH;
 

	
 
				case CSD_CARGO:
 
					SetDParam(0, CargoSpec::Get(i->accepts_cargo[j])->name);
src/misc_gui.cpp
Show inline comments
 
@@ -1007,10 +1007,12 @@ struct QueryStringWindow : public Window
 
		switch (widget) {
 
			case WID_QS_DEFAULT:
 
				this->editbox.text.DeleteAll();
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case WID_QS_OK:
 
				this->OnOk();
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case WID_QS_CANCEL:
 
				delete this;
 
				break;
 
@@ -1160,7 +1162,8 @@ struct QueryWindow : public Window {
 
					this->proc(this->parent, true);
 
					this->proc = NULL;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case WKC_ESC:
 
				delete this;
 
				return ES_HANDLED;
src/music/extmidi.cpp
Show inline comments
 
@@ -124,7 +124,7 @@ void MusicDriver_ExtMidi::DoPlay()
 

	
 
		case -1:
 
			DEBUG(driver, 0, "extmidi: couldn't fork: %s", strerror(errno));
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		default:
 
			this->song[0] = '\0';
src/music/qtmidi.cpp
Show inline comments
 
@@ -242,7 +242,7 @@ void MusicDriver_QtMidi::Stop()
 

	
 
		case QT_STATE_PLAY:
 
			StopSong();
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case QT_STATE_STOP:
 
			DisposeMovie(_quicktime_movie);
 
@@ -267,13 +267,13 @@ void MusicDriver_QtMidi::PlaySong(const 
 
		case QT_STATE_PLAY:
 
			StopSong();
 
			DEBUG(driver, 3, "qtmidi: previous tune stopped");
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case QT_STATE_STOP:
 
			DisposeMovie(_quicktime_movie);
 
			DEBUG(driver, 3, "qtmidi: previous tune disposed");
 
			_quicktime_state = QT_STATE_IDLE;
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case QT_STATE_IDLE:
 
			LoadMovieForMIDIFile(filename, &_quicktime_movie);
 
@@ -294,7 +294,7 @@ void MusicDriver_QtMidi::StopSong()
 

	
 
	switch (_quicktime_state) {
 
		case QT_STATE_IDLE:
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case QT_STATE_STOP:
 
			DEBUG(driver, 3, "qtmidi: stop requested, but already idle");
src/network/core/udp.cpp
Show inline comments
 
@@ -252,17 +252,20 @@ void NetworkUDPSocketHandler::ReceiveNet
 
				*dst = c;
 
				dst = &c->next;
 
			}
 
			/* FALL THROUGH */
 
		}
 
		FALLTHROUGH;
 

	
 
		case 3:
 
			info->game_date      = Clamp(p->Recv_uint32(), 0, MAX_DATE);
 
			info->start_date     = Clamp(p->Recv_uint32(), 0, MAX_DATE);
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case 2:
 
			info->companies_max  = p->Recv_uint8 ();
 
			info->companies_on   = p->Recv_uint8 ();
 
			info->spectators_max = p->Recv_uint8 ();
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case 1:
 
			p->Recv_string(info->server_name,     sizeof(info->server_name));
 
			p->Recv_string(info->server_revision, sizeof(info->server_revision));
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -492,10 +492,13 @@ struct NetworkChatWindow : public Window
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
			/* Send */
 
			case WID_NC_SENDBUTTON: SendChat(this->message_editbox.text.buf, this->dtype, this->dest);
 
				/* FALL THROUGH */
 
			case WID_NC_CLOSE: /* Cancel */ delete this; break;
 
			case WID_NC_SENDBUTTON: /* Send */
 
				SendChat(this->message_editbox.text.buf, this->dtype, this->dest);
 
				FALLTHROUGH;
 

	
 
			case WID_NC_CLOSE: /* Cancel */
 
				delete this;
 
				break;
 
		}
 
	}
 

	
src/network/network_client.cpp
Show inline comments
 
@@ -965,7 +965,8 @@ NetworkRecvStatus ClientNetworkGameSocke
 
			/* For speaking to company or giving money, we need the company-name */
 
			case NETWORK_ACTION_GIVE_MONEY:
 
				if (!Company::IsValidID(ci_to->client_playas)) return NETWORK_RECV_STATUS_OKAY;
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case NETWORK_ACTION_CHAT_COMPANY: {
 
				StringID str = Company::IsValidID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS;
 
				SetDParam(0, ci_to->client_playas);
src/network/network_content_gui.cpp
Show inline comments
 
@@ -908,7 +908,8 @@ public:
 
					}
 
					return ES_HANDLED;
 
				}
 
				/* FALL THROUGH, space is pressed and filter is focused. */
 
				/* space is pressed and filter is focused. */
 
				FALLTHROUGH;
 

	
 
			default:
 
				return ES_NOT_HANDLED;
src/network/network_gui.cpp
Show inline comments
 
@@ -2053,7 +2053,8 @@ struct NetworkJoinStatusWindow : Window 
 
					progress = 15; // We don't have the final size yet; the server is still compressing!
 
					break;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			default: // Waiting is 15%, so the resting receivement of map is maximum 70%
 
				progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total;
 
		}
 
@@ -2182,7 +2183,7 @@ struct NetworkCompanyPasswordWindow : pu
 
		switch (widget) {
 
			case WID_NCP_OK:
 
				this->OnOk();
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case WID_NCP_CANCEL:
 
				delete this;
src/network/network_server.cpp
Show inline comments
 
@@ -1361,7 +1361,8 @@ void NetworkServerSendChat(NetworkAction
 
		}
 
		default:
 
			DEBUG(net, 0, "[server] received unknown chat destination type %d. Doing broadcast instead", desttype);
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case DESTTYPE_BROADCAST:
 
			FOR_ALL_CLIENT_SOCKETS(cs) {
 
				cs->SendChat(action, from_id, false, msg, data);
 
@@ -1396,7 +1397,7 @@ NetworkRecvStatus ServerNetworkGameSocke
 
	switch (action) {
 
		case NETWORK_ACTION_GIVE_MONEY:
 
			if (!Company::IsValidID(ci->client_playas)) break;
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 
		case NETWORK_ACTION_CHAT:
 
		case NETWORK_ACTION_CHAT_CLIENT:
 
		case NETWORK_ACTION_CHAT_COMPANY:
src/newgrf.cpp
Show inline comments
 
@@ -2969,7 +2969,7 @@ static ChangeInfoResult CargoChangeInfo(
 
					case 0x0B: cs->town_effect = TE_FOOD; break;
 
					default:
 
						grfmsg(1, "CargoChangeInfo: Unknown town growth substitute value %d, setting to none.", substitute_type);
 
						/* FALL THROUGH */
 
						FALLTHROUGH;
 
					case 0xFF: cs->town_effect = TE_NONE; break;
 
				}
 
				break;
 
@@ -4094,7 +4094,7 @@ static ChangeInfoResult RailTypeChangeIn
 
					RailType rt = GetRailTypeByLabel(BSWAP32(label), false);
 
					if (rt != INVALID_RAILTYPE) {
 
						switch (prop) {
 
							case 0x0F: SetBit(rti->powered_railtypes, rt); // Powered implies compatible.
 
							case 0x0F: SetBit(rti->powered_railtypes, rt);               FALLTHROUGH; // Powered implies compatible.
 
							case 0x0E: SetBit(rti->compatible_railtypes, rt);            break;
 
							case 0x18: SetBit(rti->introduction_required_railtypes, rt); break;
 
							case 0x19: SetBit(rti->introduces_railtypes, rt);            break;
 
@@ -4211,7 +4211,7 @@ static ChangeInfoResult RailTypeReserveI
 
					break;
 
				}
 
				grfmsg(1, "RailTypeReserveInfo: Ignoring property 1D for rail type %u because no label was set", id + i);
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case 0x0E: // Compatible railtype list
 
			case 0x0F: // Powered railtype list
 
@@ -4350,7 +4350,7 @@ static bool HandleChangeInfoResult(const
 

	
 
		case CIR_UNKNOWN:
 
			grfmsg(0, "%s: Unknown property 0x%02X of feature 0x%02X, disabling", caller, property, feature);
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case CIR_INVALID_ID: {
 
			/* No debug message for an invalid ID, as it has already been output */
src/newgrf_gui.cpp
Show inline comments
 
@@ -1032,8 +1032,9 @@ struct NewGRFWindow : public Window, New
 
					if (this->editable && this->active_sel != NULL) SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
 
					break;
 
				}
 
				/* FALL THROUGH, with double click. */
 
				/* With double click, continue */
 
			}
 
			FALLTHROUGH;
 

	
 
			case WID_NS_REMOVE: { // Remove GRF
 
				if (this->active_sel == NULL || !this->editable) break;
 
@@ -1087,8 +1088,9 @@ struct NewGRFWindow : public Window, New
 
					if (this->editable && this->avail_sel != NULL && !HasBit(this->avail_sel->flags, GCF_INVALID)) SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
 
					break;
 
				}
 
				/* FALL THROUGH, with double click. */
 
				/* With double click, continue */
 
			}
 
			FALLTHROUGH;
 

	
 
			case WID_NS_ADD:
 
				if (this->avail_sel == NULL || !this->editable || HasBit(this->avail_sel->flags, GCF_INVALID)) break;
 
@@ -1225,10 +1227,12 @@ struct NewGRFWindow : public Window, New
 
				}
 

	
 
				this->avails.ForceRebuild();
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case GOID_NEWGRF_LIST_EDITED:
 
				this->preset = -1;
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case GOID_NEWGRF_PRESET_LOADED: {
 
				/* Update scrollbars */
 
				int i = 0;
src/newgrf_industries.cpp
Show inline comments
 
@@ -128,7 +128,7 @@ static uint32 GetCountAndDistanceOfClose
 

	
 
		case 0xFFFFFFFF: // current grf
 
			GrfID = GetIndustrySpec(current->type)->grf_prop.grffile->grfid;
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		default: // use the grfid specified in register 100h
 
			SetBit(param_setID, 7); // bit 7 means it is not an old type
src/newgrf_industries.h
Show inline comments
 
@@ -48,9 +48,11 @@ struct IndustriesResolverObject : public
 
			case VSG_SCOPE_PARENT: {
 
				TownScopeResolver *tsr = this->GetTown();
 
				if (tsr != NULL) return tsr;
 
				/* FALL-THROUGH */
 
			}
 
			default: return ResolverObject::GetScope(scope, relative);
 
			FALLTHROUGH;
 

	
 
			default:
 
				return ResolverObject::GetScope(scope, relative);
 
		}
 
	}
 
};
src/newgrf_object.cpp
Show inline comments
 
@@ -232,7 +232,7 @@ static uint32 GetCountAndDistanceOfClose
 

	
 
		case 0xFFFFFFFF: // current grf
 
			grf_id = grfid;
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		default: // use the grfid specified in register 100h
 
			idx = _object_mngr.GetID(local_id, grf_id);
src/newgrf_object.h
Show inline comments
 
@@ -128,10 +128,11 @@ struct ObjectResolverObject : public Res
 
			case VSG_SCOPE_PARENT: {
 
				TownScopeResolver *tsr = this->GetTown();
 
				if (tsr != NULL) return tsr;
 
				/* FALL-THROUGH */
 
			}
 
			FALLTHROUGH;
 

	
 
			default: return ResolverObject::GetScope(scope, relative);
 
			default:
 
				return ResolverObject::GetScope(scope, relative);
 
		}
 
	}
 

	
src/newgrf_station.h
Show inline comments
 
@@ -59,8 +59,8 @@ struct StationResolverObject : public Re
 
			case VSG_SCOPE_PARENT: {
 
				TownScopeResolver *tsr = this->GetTown();
 
				if (tsr != NULL) return tsr;
 
				/* FALL-THROUGH */
 
			}
 
			FALLTHROUGH;
 

	
 
			default:
 
				return ResolverObject::GetScope(scope, relative);
src/order_cmd.cpp
Show inline comments
 
@@ -772,7 +772,8 @@ CommandCost CmdInsertOrder(TileIndex til
 
				case OSL_PLATFORM_NEAR_END:
 
				case OSL_PLATFORM_MIDDLE:
 
					if (v->type != VEH_TRAIN) return CMD_ERROR;
 
					/* FALL THROUGH */
 
					FALLTHROUGH;
 

	
 
				case OSL_PLATFORM_FAR_END:
 
					break;
 

	
 
@@ -880,7 +881,8 @@ CommandCost CmdInsertOrder(TileIndex til
 
				case OCV_LOAD_PERCENTAGE:
 
				case OCV_RELIABILITY:
 
					if (new_order.GetConditionValue() > 100) return CMD_ERROR;
 
					/* FALL THROUGH */
 
					FALLTHROUGH;
 

	
 
				default:
 
					if (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) return CMD_ERROR;
 
					break;
 
@@ -1466,7 +1468,8 @@ CommandCost CmdModifyOrder(TileIndex til
 
					case OCV_LOAD_PERCENTAGE:
 
					case OCV_RELIABILITY:
 
						if (order->GetConditionValue() > 100) order->SetConditionValue(100);
 
						/* FALL THROUGH */
 
						FALLTHROUGH;
 

	
 
					default:
 
						if (occ == OCC_IS_TRUE || occ == OCC_IS_FALSE) order->SetConditionComparator(OCC_EQUALS);
 
						break;
src/order_gui.cpp
Show inline comments
 
@@ -841,7 +841,7 @@ public:
 
			case VIWD_AUTOREPLACE:
 
				/* Autoreplace replaced the vehicle */
 
				this->vehicle = Vehicle::Get(this->window_number);
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case VIWD_CONSIST_CHANGED:
 
				/* Vehicle composition was changed. */
src/pathfinder/yapf/yapf_destrail.hpp
Show inline comments
 
@@ -140,7 +140,8 @@ public:
 
					 * waypoint. */
 
					Yapf().DisableCache(true);
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case OT_GOTO_STATION:
 
				m_destTile = CalcClosestStationTile(v->current_order.GetDestination(), v->tile, v->current_order.IsType(OT_GOTO_STATION) ? STATION_RAIL : STATION_WAYPOINT);
 
				m_dest_station_id = v->current_order.GetDestination();
src/rail_cmd.cpp
Show inline comments
 
@@ -554,8 +554,8 @@ CommandCost CmdBuildSingleRail(TileIndex
 
			if (IsLevelCrossing(tile) && GetCrossingRailBits(tile) == trackbit) {
 
				return_cmd_error(STR_ERROR_ALREADY_BUILT);
 
			}
 
			/* FALL THROUGH */
 
		}
 
		FALLTHROUGH;
 

	
 
		default: {
 
			/* Will there be flat water on the lower halftile? */
 
@@ -2444,33 +2444,60 @@ static void DrawTile_Track(TileInfo *ti)
 
			SpriteID ground = GetCustomRailSprite(rti, ti->tile, RTSG_GROUND);
 

	
 
			switch (GetRailDepotDirection(ti->tile)) {
 
				case DIAGDIR_NE: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
 
				case DIAGDIR_SW: DrawGroundSprite(ground + RTO_X, PAL_NONE); break;
 
				case DIAGDIR_NW: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
 
				case DIAGDIR_SE: DrawGroundSprite(ground + RTO_Y, PAL_NONE); break;
 
				default: break;
 
				case DIAGDIR_NE:
 
					if (!IsInvisibilitySet(TO_BUILDINGS)) break;
 
					FALLTHROUGH;
 
				case DIAGDIR_SW:
 
					DrawGroundSprite(ground + RTO_X, PAL_NONE);
 
					break;
 
				case DIAGDIR_NW:
 
					if (!IsInvisibilitySet(TO_BUILDINGS)) break;
 
					FALLTHROUGH;
 
				case DIAGDIR_SE:
 
					DrawGroundSprite(ground + RTO_Y, PAL_NONE);
 
					break;
 
				default:
 
					break;
 
			}
 

	
 
			if (_settings_client.gui.show_track_reservation && HasDepotReservation(ti->tile)) {
 
				SpriteID overlay = GetCustomRailSprite(rti, ti->tile, RTSG_OVERLAY);
 

	
 
				switch (GetRailDepotDirection(ti->tile)) {
 
					case DIAGDIR_NE: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
 
					case DIAGDIR_SW: DrawGroundSprite(overlay + RTO_X, PALETTE_CRASH); break;
 
					case DIAGDIR_NW: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
 
					case DIAGDIR_SE: DrawGroundSprite(overlay + RTO_Y, PALETTE_CRASH); break;
 
					default: break;
 
					case DIAGDIR_NE:
 
						if (!IsInvisibilitySet(TO_BUILDINGS)) break;
 
						FALLTHROUGH;
 
					case DIAGDIR_SW:
 
						DrawGroundSprite(overlay + RTO_X, PALETTE_CRASH);
 
						break;
 
					case DIAGDIR_NW:
 
						if (!IsInvisibilitySet(TO_BUILDINGS)) break;
 
						FALLTHROUGH;
 
					case DIAGDIR_SE:
 
						DrawGroundSprite(overlay + RTO_Y, PALETTE_CRASH);
 
						break;
 
					default:
 
						break;
 
				}
 
			}
 
		} else {
 
			/* PBS debugging, draw reserved tracks darker */
 
			if (_game_mode != GM_MENU && _settings_client.gui.show_track_reservation && HasDepotReservation(ti->tile)) {
 
				switch (GetRailDepotDirection(ti->tile)) {
 
					case DIAGDIR_NE: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
 
					case DIAGDIR_SW: DrawGroundSprite(rti->base_sprites.single_x, PALETTE_CRASH); break;
 
					case DIAGDIR_NW: if (!IsInvisibilitySet(TO_BUILDINGS)) break; // else FALL THROUGH
 
					case DIAGDIR_SE: DrawGroundSprite(rti->base_sprites.single_y, PALETTE_CRASH); break;
 
					default: break;
 
					case DIAGDIR_NE:
 
						if (!IsInvisibilitySet(TO_BUILDINGS)) break;
 
						FALLTHROUGH;
 
					case DIAGDIR_SW:
 
						DrawGroundSprite(rti->base_sprites.single_x, PALETTE_CRASH);
 
						break;
 
					case DIAGDIR_NW:
 
						if (!IsInvisibilitySet(TO_BUILDINGS)) break;
 
						FALLTHROUGH;
 
					case DIAGDIR_SE:
 
						DrawGroundSprite(rti->base_sprites.single_y, PALETTE_CRASH);
 
						break;
 
					default:
 
						break;
 
				}
 
			}
 
		}
src/saveload/afterload.cpp
Show inline comments
 
@@ -154,7 +154,7 @@ static void ConvertTownOwner()
 
				if (GB(_m[tile].m5, 4, 2) == ROAD_TILE_CROSSING && HasBit(_m[tile].m3, 7)) {
 
					_m[tile].m3 = OWNER_TOWN;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case MP_TUNNELBRIDGE:
 
				if (_m[tile].m1 & 0x80) SetTileOwner(tile, OWNER_TOWN);
src/saveload/company_sl.cpp
Show inline comments
 
@@ -185,7 +185,7 @@ void AfterLoadCompanyStats()
 
						}
 
					}
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case MP_OBJECT:
 
				if (GetWaterClass(tile) == WATER_CLASS_CANAL) {
src/saveload/vehicle_sl.cpp
Show inline comments
 
@@ -433,8 +433,8 @@ void AfterLoadVehicles(bool part_of_load
 
				RoadVehicle *rv = RoadVehicle::From(v);
 
				rv->roadtype = HasBit(EngInfo(v->First()->engine_type)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD;
 
				rv->compatible_roadtypes = RoadTypeToRoadTypes(rv->roadtype);
 
				/* FALL THROUGH */
 
			}
 
			FALLTHROUGH;
 

	
 
			case VEH_TRAIN:
 
			case VEH_SHIP:
src/script/api/script_error.cpp
Show inline comments
 
@@ -40,7 +40,8 @@ ScriptError::ScriptErrorMapString Script
 

	
 
		case TEXT_TAB_SPECIAL:
 
			if (index < 0xE4) break; // Player name
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case TEXT_TAB_TOWN:
 
			if (index < 0xC0) break; // Town name
 
			/* These strings are 'random' and have no meaning.
src/settings.cpp
Show inline comments
 
@@ -178,7 +178,8 @@ static int ParseIntList(const char *p, i
 
				/* Do not accept multiple commas between numbers */
 
				if (!comma) return -1;
 
				comma = false;
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case ' ':
 
				p++;
 
				break;
src/signal.cpp
Show inline comments
 
@@ -504,7 +504,8 @@ static SigSegState UpdateSignalsInBuffer
 
					_tbdset.Add(tile, INVALID_DIAGDIR); // start from depot inside
 
					break;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case MP_STATION:
 
			case MP_ROAD:
 
				if ((TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)) & _enterdir_to_trackbits[dir]) != TRACK_BIT_NONE) {
 
@@ -513,7 +514,8 @@ static SigSegState UpdateSignalsInBuffer
 
					_tbdset.Add(tile + TileOffsByDiagDir(dir), ReverseDiagDir(dir));
 
					break;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			default:
 
				/* jump to next tile */
 
				tile = tile + TileOffsByDiagDir(dir);
src/signs_gui.cpp
Show inline comments
 
@@ -514,7 +514,7 @@ struct SignWindow : Window, SignList {
 

	
 
			case WID_QES_OK:
 
				if (RenameSign(this->cur_sign, this->name_editbox.text.buf)) break;
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case WID_QES_CANCEL:
 
				delete this;
src/smallmap_gui.cpp
Show inline comments
 
@@ -1229,10 +1229,12 @@ void SmallMapWindow::RebuildColourIndexI
 
						if (tbl->show_on_map && tbl->type == _smallmap_industry_highlight) {
 
							legend_colour = _smallmap_industry_highlight_state ? PC_WHITE : PC_BLACK;
 
						}
 
						/* FALL THROUGH */
 
						FALLTHROUGH;
 

	
 
					case SMT_LINKSTATS:
 
						SetDParam(0, tbl->legend);
 
						/* FALL_THROUGH */
 
						FALLTHROUGH;
 

	
 
					case SMT_OWNER:
 
						if (this->map_type != SMT_OWNER || tbl->company != INVALID_COMPANY) {
 
							if (this->map_type == SMT_OWNER) SetDParam(0, tbl->company);
 
@@ -1246,7 +1248,8 @@ void SmallMapWindow::RebuildColourIndexI
 
							}
 
							break;
 
						}
 
						/* FALL_THROUGH */
 
						FALLTHROUGH;
 

	
 
					default:
 
						if (this->map_type == SMT_CONTOUR) SetDParam(0, tbl->height * TILE_HEIGHT_STEP);
 
						/* Anything that is not an industry or a company is using normal process */
 
@@ -1465,7 +1468,6 @@ int SmallMapWindow::GetPositionOnLegend(
 
			break;
 

	
 
		case WID_SM_ENABLE_ALL:
 
			/* FALL THROUGH */
 
		case WID_SM_DISABLE_ALL: {
 
			LegendAndColour *tbl = NULL;
 
			switch (this->map_type) {
src/spritecache.cpp
Show inline comments
 
@@ -818,7 +818,7 @@ static void *HandleInvalidSpriteRequest(
 
	switch (requested) {
 
		case ST_NORMAL:
 
			if (sprite == SPR_IMG_QUERY) usererror("Uhm, would you be so kind not to load a NewGRF that makes the 'query' sprite a non-normal sprite?");
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 
		case ST_FONT:
 
			return GetRawSprite(SPR_IMG_QUERY, ST_NORMAL, allocator);
 
		case ST_RECOLOUR:
src/station_cmd.cpp
Show inline comments
 
@@ -3091,7 +3091,8 @@ static void TileLoop_Station(TileIndex t
 

	
 
		case STATION_DOCK:
 
			if (!IsTileFlat(tile)) break; // only handle water part
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case STATION_OILRIG: //(station part)
 
		case STATION_BUOY:
 
			TileLoop_Water(tile);
src/stdafx.h
Show inline comments
 
@@ -156,6 +156,17 @@
 
	#else
 
		#define FINAL
 
	#endif
 

	
 
	/* Use fallthrough attribute where supported */
 
	#if __GNUC__ >= 7
 
		#if __cplusplus > 201402L // C++17
 
			#define FALLTHROUGH [[fallthrough]]
 
		#else
 
			#define FALLTHROUGH __attribute__((fallthrough))
 
		#endif
 
	#else
 
		#define FALLTHROUGH
 
	#endif
 
#endif /* __GNUC__ */
 

	
 
#if defined(__WATCOMC__)
 
@@ -164,6 +175,7 @@
 
	#define GCC_PACK
 
	#define WARN_FORMAT(string, args)
 
	#define FINAL
 
	#define FALLTHROUGH
 
	#include <malloc.h>
 
#endif /* __WATCOMC__ */
 

	
 
@@ -235,6 +247,13 @@
 
	#define WARN_FORMAT(string, args)
 
	#define FINAL sealed
 

	
 
	/* fallthrough attribute, VS 2017 */
 
	#if (_MSC_VER >= 1910)
 
		#define FALLTHROUGH [[fallthrough]]
 
	#else
 
		#define FALLTHROUGH
 
	#endif
 

	
 
	#if defined(WINCE)
 
		int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap);
 
	#endif
src/terraform_gui.cpp
Show inline comments
 
@@ -80,12 +80,14 @@ static void GenerateRockyArea(TileIndex 
 
		switch (GetTileType(tile)) {
 
			case MP_TREES:
 
				if (GetTreeGround(tile) == TREE_GROUND_SHORE) continue;
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case MP_CLEAR:
 
				MakeClear(tile, CLEAR_ROCKS, 3);
 
				break;
 

	
 
			default: continue;
 
			default:
 
				continue;
 
		}
 
		MarkTileDirtyByTile(tile);
 
		success = true;
src/timetable_gui.cpp
Show inline comments
 
@@ -197,7 +197,8 @@ struct TimetableWindow : Window {
 
				this->deparr_time_width = GetStringBoundingBox(STR_JUST_DATE_TINY).width;
 
				this->deparr_abbr_width = max(GetStringBoundingBox(STR_TIMETABLE_ARRIVAL_ABBREVIATION).width, GetStringBoundingBox(STR_TIMETABLE_DEPARTURE_ABBREVIATION).width);
 
				size->width = WD_FRAMERECT_LEFT + this->deparr_abbr_width + 10 + this->deparr_time_width + WD_FRAMERECT_RIGHT;
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case WID_VT_ARRIVAL_DEPARTURE_SELECTION:
 
			case WID_VT_TIMETABLE_PANEL:
 
				resize->height = FONT_HEIGHT_NORMAL;
src/town_cmd.cpp
Show inline comments
 
@@ -1244,7 +1244,7 @@ static void GrowTownInTile(TileIndex *ti
 

	
 
				case TL_3X3_GRID: // Use 2x2 grid afterwards!
 
					GrowTownWithExtraHouse(t1, TileAddByDiagDir(house_tile, target_dir));
 
					/* FALL THROUGH */
 
					FALLTHROUGH;
 

	
 
				case TL_2X2_GRID:
 
					rcmd = GetTownRoadGridElement(t1, tile, target_dir);
 
@@ -1253,7 +1253,7 @@ static void GrowTownInTile(TileIndex *ti
 

	
 
				case TL_BETTER_ROADS: // Use original afterwards!
 
					GrowTownWithExtraHouse(t1, TileAddByDiagDir(house_tile, target_dir));
 
					/* FALL THROUGH */
 
					FALLTHROUGH;
 

	
 
				case TL_ORIGINAL:
 
					/* Allow a house at the edge. 60% chance or
 
@@ -3259,7 +3259,7 @@ Town *ClosestTownFromTile(TileIndex tile
 

	
 
				return town;
 
			}
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case MP_HOUSE:
 
			return Town::GetByTile(tile);
src/town_gui.cpp
Show inline comments
 
@@ -267,9 +267,10 @@ public:
 
					this->sel_index = y;
 
					this->SetDirty();
 
				}
 
				/* FALL THROUGH, when double-clicking. */
 
				/* When double-clicking, continue */
 
				if (click_count == 1 || y < 0) break;
 
			}
 
			FALLTHROUGH;
 

	
 
			case WID_TA_EXECUTE:
 
				DoCommandP(this->town->xy, this->window_number, this->sel_index, CMD_DO_TOWN_ACTION | CMD_MSG(STR_ERROR_CAN_T_DO_THIS));
src/train_cmd.cpp
Show inline comments
 
@@ -2502,6 +2502,7 @@ public:
 
				case OT_GOTO_DEPOT:
 
					/* Skip service in depot orders when the train doesn't need service. */
 
					if ((order->GetDepotOrderType() & ODTFB_SERVICE) && !this->v->NeedsServicing()) break;
 
					FALLTHROUGH;
 
				case OT_GOTO_STATION:
 
				case OT_GOTO_WAYPOINT:
 
					this->v->current_order = *order;
 
@@ -3608,7 +3609,7 @@ static bool TrainApproachingLineEnd(Trai
 
	 * for other directions, it will be 1, 3, 5, ..., 15 */
 
	switch (v->direction) {
 
		case DIR_N : x = ~x + ~y + 25; break;
 
		case DIR_NW: x = y;            // FALL THROUGH
 
		case DIR_NW: x = y;            FALLTHROUGH;
 
		case DIR_NE: x = ~x + 16;      break;
 
		case DIR_E : x = ~x + y + 9;   break;
 
		case DIR_SE: x = y;            break;
src/tree_cmd.cpp
Show inline comments
 
@@ -375,7 +375,8 @@ CommandCost CmdPlantTree(TileIndex tile,
 
					msg = STR_ERROR_CAN_T_BUILD_ON_WATER;
 
					continue;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case MP_CLEAR: {
 
				if (IsBridgeAbove(tile)) {
 
					msg = STR_ERROR_SITE_UNSUITABLE;
 
@@ -680,7 +681,7 @@ static void TileLoop_Trees(TileIndex til
 
							SetTreeGrowth(tile, 0);
 
							break;
 
						}
 
						/* FALL THROUGH */
 
						FALLTHROUGH;
 

	
 
					case 2: { // add a neighbouring tree
 
						/* Don't plant extra trees if that's not allowed. */
src/vehicle.cpp
Show inline comments
 
@@ -1269,7 +1269,7 @@ bool Vehicle::HandleBreakdown()
 
			SetWindowDirty(WC_VEHICLE_VIEW, this->index);
 
			SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
 

	
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 
		case 1:
 
			/* Aircraft breakdowns end only when arriving at the airport */
 
			if (this->type == VEH_AIRCRAFT) return false;
src/vehicle_gui.cpp
Show inline comments
 
@@ -817,8 +817,8 @@ struct RefitWindow : public Window {
 
				Vehicle *v = Vehicle::Get(this->window_number);
 
				this->selected_vehicle = v->index;
 
				this->num_vehicles = UINT8_MAX;
 
				/* FALL THROUGH */
 
			}
 
			FALLTHROUGH;
 

	
 
			case 2: { // The vehicle selection has changed; rebuild the entire list.
 
				if (!gui_scope) break;
 
@@ -843,8 +843,8 @@ struct RefitWindow : public Window {
 
					this->information_width = max_width;
 
					this->ReInit();
 
				}
 
				/* FALL THROUGH */
 
			}
 
			FALLTHROUGH;
 

	
 
			case 1: // A new cargo has been selected.
 
				if (!gui_scope) break;
 
@@ -905,8 +905,8 @@ struct RefitWindow : public Window {
 
					if (_ctrl_pressed) this->num_vehicles = UINT8_MAX;
 
					break;
 
				}
 
				/* FALL THROUGH */
 
			}
 
			FALLTHROUGH;
 

	
 
			default:
 
				/* Clear the selection. */
 
@@ -940,8 +940,8 @@ struct RefitWindow : public Window {
 
				this->InvalidateData(1);
 

	
 
				if (click_count == 1) break;
 
				/* FALL THROUGH */
 
			}
 
			FALLTHROUGH;
 

	
 
			case WID_VR_REFIT: // refit button
 
				if (this->cargo != NULL) {
 
@@ -2638,8 +2638,7 @@ public:
 
						str = STR_VEHICLE_STATUS_LEAVING;
 
						break;
 
					}
 
					/* FALL THROUGH, if aircraft. Does this even happen? */
 

	
 
					FALLTHROUGH;
 
				default:
 
					if (v->GetNumManualOrders() == 0) {
 
						str = STR_VEHICLE_STATUS_NO_ORDERS_VEL;
src/vehiclelist.cpp
Show inline comments
 
@@ -156,7 +156,7 @@ bool GenerateVehicleSortList(VehicleList
 
				}
 
				break;
 
			}
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case VL_STANDARD:
 
			FOR_ALL_VEHICLES(v) {
src/video/cocoa/event.mm
Show inline comments
 
@@ -610,7 +610,7 @@ static bool QZ_PollEvent()
 
			 * the mouse position programmatically, which would trigger OS X to show
 
			 * the default arrow cursor if the events are propagated. */
 
			if (_cursor.fix_at) break;
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		default:
 
			[ NSApp sendEvent:event ];
src/video/win32_v.cpp
Show inline comments
 
@@ -680,7 +680,7 @@ static LRESULT CALLBACK WndProcGdi(HWND 
 

	
 
		case WM_PALETTECHANGED:
 
			if ((HWND)wParam == hwnd) return 0;
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case WM_QUERYNEWPALETTE: {
 
			HDC hDC = GetWindowDC(hwnd);
src/viewport.cpp
Show inline comments
 
@@ -2633,8 +2633,8 @@ static int CalcHeightdiff(HighLightStyle
 
			byte style_t = (byte)(TileX(end_tile) > TileX(start_tile));
 
			start_tile = TILE_ADD(start_tile, ToTileIndexDiff(heightdiff_area_by_dir[style_t]));
 
			end_tile   = TILE_ADD(end_tile, ToTileIndexDiff(heightdiff_area_by_dir[2 + style_t]));
 
			/* FALL THROUGH */
 
		}
 
		FALLTHROUGH;
 

	
 
		case HT_POINT:
 
			h0 = TileHeight(start_tile);
 
@@ -2979,7 +2979,7 @@ void VpSelectTilesWithMethod(int x, int 
 

	
 
		case VPM_X_LIMITED: // Drag in X direction (limited size).
 
			limit = (_thd.sizelimit - 1) * TILE_SIZE;
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case VPM_FIX_X: // drag in Y direction
 
			x = sx;
 
@@ -2988,7 +2988,7 @@ void VpSelectTilesWithMethod(int x, int 
 

	
 
		case VPM_Y_LIMITED: // Drag in Y direction (limited size).
 
			limit = (_thd.sizelimit - 1) * TILE_SIZE;
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case VPM_FIX_Y: // drag in X direction
 
			y = sy;
 
@@ -3026,7 +3026,7 @@ calc_heightdiff_single_direction:;
 
			limit = (_thd.sizelimit - 1) * TILE_SIZE;
 
			x = sx + Clamp(x - sx, -limit, limit);
 
			y = sy + Clamp(y - sy, -limit, limit);
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 

	
 
		case VPM_X_AND_Y: // drag an X by Y area
 
			if (_settings_client.gui.measure_tooltip) {
src/water_cmd.cpp
Show inline comments
 
@@ -437,7 +437,7 @@ CommandCost CmdBuildCanal(TileIndex tile
 
						MakeSea(tile);
 
						break;
 
					}
 
					/* FALL THROUGH */
 
					FALLTHROUGH;
 

	
 
				default:
 
					MakeCanal(tile, _current_company, Random());
 
@@ -1015,7 +1015,7 @@ FloodingBehaviour GetFloodingBehaviour(T
 
				Slope tileh = GetTileSlope(tile);
 
				return (IsSlopeWithOneCornerRaised(tileh) ? FLOOD_ACTIVE : FLOOD_DRYUP);
 
			}
 
			/* FALL THROUGH */
 
			FALLTHROUGH;
 
		case MP_STATION:
 
		case MP_INDUSTRY:
 
		case MP_OBJECT:
 
@@ -1064,7 +1064,7 @@ void DoFloodTile(TileIndex target)
 
					flooded = true;
 
					break;
 
				}
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case MP_CLEAR:
 
				if (DoCommand(target, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR).Succeeded()) {
src/widget.cpp
Show inline comments
 
@@ -2287,8 +2287,8 @@ void NWidgetLeaf::SetupSmallestSize(Wind
 
			Dimension sprite_size = GetSpriteSize(_current_text_dir == TD_RTL ? SPR_IMG_DELETE_RIGHT : SPR_IMG_DELETE_LEFT);
 
			size.width = max(size.width, 30 + sprite_size.width);
 
			size.height = max(sprite_size.height, GetStringBoundingBox("_").height + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
 
			/* FALL THROUGH */
 
		}
 
		FALLTHROUGH;
 
		case WWT_PUSHBTN: {
 
			static const Dimension extra = {WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM};
 
			padding = &extra;
src/window.cpp
Show inline comments
 
@@ -1277,26 +1277,33 @@ static uint GetWindowZPriority(const Win
 
	switch (w->window_class) {
 
		case WC_ENDSCREEN:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_HIGHSCORE:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_TOOLTIPS:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_DROPDOWN_MENU:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_MAIN_TOOLBAR:
 
		case WC_STATUS_BAR:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_OSK:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_QUERY_STRING:
 
		case WC_SEND_NETWORK_MSG:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_ERRMSG:
 
		case WC_CONFIRM_POPUP_QUERY:
 
@@ -1304,6 +1311,7 @@ static uint GetWindowZPriority(const Win
 
		case WC_NETWORK_STATUS_WINDOW:
 
		case WC_SAVE_PRESET:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_GENERATE_LANDSCAPE:
 
		case WC_SAVELOAD:
 
@@ -1315,15 +1323,19 @@ static uint GetWindowZPriority(const Win
 
		case WC_AI_SETTINGS:
 
		case WC_TEXTFILE:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_CONSOLE:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_NEWS_WINDOW:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		default:
 
			++z_priority;
 
			FALLTHROUGH;
 

	
 
		case WC_MAIN_WINDOW:
 
			return z_priority;
 
@@ -2867,7 +2879,7 @@ static void MouseLoop(MouseClick click, 
 
				if (!scrollwheel_scrolling || w == NULL || w->window_class != WC_SMALLMAP) break;
 
				/* We try to use the scrollwheel to scroll since we didn't touch any of the buttons.
 
				 * Simulate a right button click so we can get started. */
 
				/* FALL THROUGH */
 
				FALLTHROUGH;
 

	
 
			case MC_RIGHT: DispatchRightClickEvent(w, x - w->left, y - w->top); break;
 

	
0 comments (0 inline, 0 general)