changeset 15579:5f128be91f59 draft

(svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH).
author terkhen <terkhen@openttd.org>
date Thu, 29 Jul 2010 14:26:28 +0000
parents 37254d8be435
children d45fb3c4cf92
files src/ai/ai_scanner.cpp src/cheat_gui.cpp src/company_gui.cpp src/console.cpp src/depend/depend.cpp src/engine_gui.cpp src/fios.cpp src/misc_gui.cpp src/music/extmidi.cpp src/music/qtmidi.cpp src/network/core/udp.cpp src/network/network_chat_gui.cpp src/network/network_client.cpp src/network/network_content_gui.cpp src/network/network_gui.cpp src/network/network_server.cpp src/newgrf.cpp src/newgrf_gui.cpp src/newgrf_industries.cpp src/rail_cmd.cpp src/saveload/afterload.cpp src/signal.cpp src/spritecache.cpp src/timetable_gui.cpp src/town_gui.cpp src/train_cmd.cpp src/vehicle_gui.cpp src/video/win32_v.cpp src/viewport.cpp src/widget.cpp
diffstat 30 files changed, 52 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/src/ai/ai_scanner.cpp
+++ b/src/ai/ai_scanner.cpp
@@ -298,7 +298,7 @@
 		*e = '\0';
 		e++;
 		versionParam = atoi(e);
-		/* Fall-through, like we were calling this function with a version */
+		/* FALL THROUGH, like we were calling this function with a version. */
 	}
 
 	if (force_exact_match) {
--- a/src/cheat_gui.cpp
+++ b/src/cheat_gui.cpp
@@ -202,8 +202,8 @@
 
 						/* Set correct string for switch climate cheat */
 						case STR_CHEAT_SWITCH_CLIMATE: val += STR_CHEAT_SWITCH_CLIMATE_TEMPERATE_LANDSCAPE;
+							/* FALL THROUGH */
 
-						/* Fallthrough */
 						default: SetDParam(0, val);
 					}
 				} break;
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -327,7 +327,7 @@
 			case CFW_EXPS_PRICE2:
 			case CFW_EXPS_PRICE3:
 				size->height = _expenses_list_types[type].GetHeight();
-				/* Fall through */
+				/* FALL THROUGH */
 			case CFW_BALANCE_VALUE:
 			case CFW_LOAN_VALUE:
 			case CFW_TOTAL_VALUE:
@@ -640,7 +640,7 @@
 					size->width = 0;
 					break;
 				}
-				/* Fall through */
+				/* FALL THROUGH */
 			case SCLW_WIDGET_PRI_COL_DROPDOWN: {
 				for (const StringID *id = _colour_dropdown; id != endof(_colour_dropdown); id++) {
 					size->width = max(size->width, GetStringBoundingBox(*id).width + 34);
@@ -1405,7 +1405,7 @@
 			/* OK button */
 			case SCMFW_WIDGET_ACCEPT:
 				DoCommandP(0, 0, this->face, CMD_SET_COMPANY_MANAGER_FACE);
-				/* Fall-Through */
+				/* FALL THROUGH */
 
 			/* Cancel button */
 			case SCMFW_WIDGET_CANCEL:
--- a/src/console.cpp
+++ b/src/console.cpp
@@ -439,7 +439,7 @@
 				tokenstream[tstream_i++] = *++cmdptr;
 				break;
 			}
-			/* fallthrough */
+			/* FALL THROUGH */
 		default: // Normal character
 			tokenstream[tstream_i++] = *cmdptr;
 
--- a/src/depend/depend.cpp
+++ b/src/depend/depend.cpp
@@ -674,7 +674,7 @@
 									free((void*)h);
 								}
 							}
-							/* Fall through */
+							/* FALL THROUGH */
 							default: break;
 						}
 						break;
@@ -796,7 +796,7 @@
 						break;
 				}
 				if (verbose) fprintf(stderr, "\n");
-			/* Fall through */
+				/* FALL THROUGH */
 			default:
 				/* Ignore the rest of the garbage on this line */
 				while (lexer.GetToken() != TOKEN_EOL && lexer.GetToken() != TOKEN_END) lexer.Lex();
--- a/src/engine_gui.cpp
+++ b/src/engine_gui.cpp
@@ -111,7 +111,7 @@
 		switch (widget) {
 			case EPW_YES:
 				DoCommandP(0, this->window_number, 0, CMD_WANT_ENGINE_PREVIEW);
-				/* Fallthrough */
+				/* FALL THROUGH */
 			case EPW_NO:
 				delete this;
 				break;
--- a/src/fios.cpp
+++ b/src/fios.cpp
@@ -100,7 +100,7 @@
 #elif defined(WIN32) || defined(__OS2__)
 			snprintf(path, MAX_PATH, "%c:" PATHSEP, item->title[0]);
 #endif
-		/* Fallthrough */
+			/* FALL THROUGH */
 		case FIOS_TYPE_INVALID:
 			break;
 
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -1340,10 +1340,10 @@
 		switch (widget) {
 			case QUERY_STR_WIDGET_DEFAULT:
 				this->text.buf[0] = '\0';
-				/* Fallthrough */
+				/* FALL THROUGH */
 			case QUERY_STR_WIDGET_OK:
 				this->OnOk();
-				/* Fallthrough */
+				/* FALL THROUGH */
 			case QUERY_STR_WIDGET_CANCEL:
 				delete this;
 				break;
@@ -1532,7 +1532,7 @@
 					this->proc(this->parent, true);
 					this->proc = NULL;
 				}
-				/* Fallthrough */
+				/* FALL THROUGH */
 			case WKC_ESC:
 				delete this;
 				return ES_HANDLED;
--- a/src/music/extmidi.cpp
+++ b/src/music/extmidi.cpp
@@ -99,7 +99,7 @@
 
 		case -1:
 			DEBUG(driver, 0, "extmidi: couldn't fork: %s", strerror(errno));
-			/* FALLTHROUGH */
+			/* FALL THROUGH */
 
 		default:
 			this->song[0] = '\0';
--- a/src/music/qtmidi.cpp
+++ b/src/music/qtmidi.cpp
@@ -240,7 +240,7 @@
 
 		case QT_STATE_PLAY:
 			StopSong();
-			/* Fall-through */
+			/* FALL THROUGH */
 
 		case QT_STATE_STOP:
 			DisposeMovie(_quicktime_movie);
@@ -265,13 +265,13 @@
 		case QT_STATE_PLAY:
 			StopSong();
 			DEBUG(driver, 3, "qtmidi: previous tune stopped");
-			/* Fall-through -- no break needed. */
+			/* FALL THROUGH */
 
 		case QT_STATE_STOP:
 			DisposeMovie(_quicktime_movie);
 			DEBUG(driver, 3, "qtmidi: previous tune disposed");
 			_quicktime_state = QT_STATE_IDLE;
-			/* Fall-through -- no break needed. */
+			/* FALL THROUGH */
 
 		case QT_STATE_IDLE:
 			LoadMovieForMIDIFile(filename, &_quicktime_movie);
@@ -292,7 +292,7 @@
 
 	switch (_quicktime_state) {
 		case QT_STATE_IDLE:
-			/* Fall-through -- no break needed. */
+			/* FALL THROUGH */
 
 		case QT_STATE_STOP:
 			DEBUG(driver, 3, "qtmidi: stop requested, but already idle");
--- a/src/network/core/udp.cpp
+++ b/src/network/core/udp.cpp
@@ -246,16 +246,16 @@
 				*dst = c;
 				dst = &c->next;
 			}
-		} // Fallthrough
+		} // FALL THROUGH
 		case 3:
 			info->game_date      = Clamp(p->Recv_uint32(), 0, MAX_DATE);
 			info->start_date     = Clamp(p->Recv_uint32(), 0, MAX_DATE);
-			/* Fallthrough */
+			/* FALL THROUGH */
 		case 2:
 			info->companies_max  = p->Recv_uint8 ();
 			info->companies_on   = p->Recv_uint8 ();
 			info->spectators_max = p->Recv_uint8 ();
-			/* Fallthrough */
+			/* FALL THROUGH */
 		case 1:
 			p->Recv_string(info->server_name,     sizeof(info->server_name));
 			p->Recv_string(info->server_revision, sizeof(info->server_revision));
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -484,7 +484,7 @@
 		switch (widget) {
 			/* Send */
 			case NWCW_SENDBUTTON: SendChat(this->text.buf, this->dtype, this->dest);
-			/* FALLTHROUGH */
+				/* FALL THROUGH */
 			case NWCW_CLOSE: /* Cancel */ delete this; break;
 		}
 	}
@@ -510,7 +510,7 @@
 				} break;
 				case HEBR_CONFIRM:
 					SendChat(this->text.buf, this->dtype, this->dest);
-				/* FALLTHROUGH */
+					/* FALL THROUGH */
 				case HEBR_CANCEL: delete this; break;
 				case HEBR_NOT_FOCUSED: break;
 			}
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -782,7 +782,7 @@
 			/* 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;
-				/* fallthrough */
+				/* FALL THROUGH */
 			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);
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -688,7 +688,7 @@
 					}
 					return ES_HANDLED;
 				}
-				/* Fall through when pressing space is pressed and filter isn't focused */
+				/* FALL THROUGH, space is pressed and filter isn't focused. */
 
 			default: {
 				/* Handle editbox input */
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -2158,7 +2158,7 @@
 				SetDParam(0, _network_join_bytes);
 				SetDParam(1, _network_join_bytes_total);
 				DrawString(r.left + 2, r.right - 2, r.top + 20 + FONT_HEIGHT_NORMAL, STR_NETWORK_CONNECTING_DOWNLOADING, TC_FROMSTRING, SA_HOR_CENTER);
-				/* Fallthrough */
+				/* FALL THROUGH */
 			default: // Waiting is 15%, so the resting receivement of map is maximum 70%
 				progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total;
 		}
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1153,7 +1153,7 @@
 		break;
 	default:
 		DEBUG(net, 0, "[server] received unknown chat destination type %d. Doing broadcast instead", desttype);
-		/* fall-through to next case */
+		/* FALL THROUGH */
 	case DESTTYPE_BROADCAST:
 		FOR_ALL_CLIENT_SOCKETS(cs) {
 			SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, from_id, false, msg, data);
@@ -1185,7 +1185,7 @@
 	switch (action) {
 		case NETWORK_ACTION_GIVE_MONEY:
 			if (!Company::IsValidID(ci->client_playas)) break;
-			/* Fall-through */
+			/* FALL THROUGH */
 		case NETWORK_ACTION_CHAT:
 		case NETWORK_ACTION_CHAT_CLIENT:
 		case NETWORK_ACTION_CHAT_COMPANY:
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -3028,7 +3028,7 @@
 
 		case CIR_UNKNOWN:
 			grfmsg(0, "%s: Unknown property 0x%02X of feature 0x%02X, disabling", caller, property, feature);
-			/* Fall through */
+			/* FALL THROUGH */
 
 		case CIR_INVALID_ID:
 			/* No debug message for an invalid ID, as it has already been output */
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -495,7 +495,7 @@
 				this->InvalidateData();
 				if (click_count == 1) break;
 			}
-			/* Fall through with double click. */
+			/* FALL THROUGH, with double click. */
 			case SNGRFS_REMOVE: { // Remove GRF
 				if (this->active_sel == NULL || !this->editable) break;
 
@@ -535,7 +535,7 @@
 				this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window
 				if (click_count == 1) break;
 			}
-			/* Fall through with double click. */
+			/* FALL THROUGH, with double click. */
 			case SNGRFS_ADD: {
 				if (this->avail_sel == NULL || !this->editable) break;
 
@@ -727,13 +727,13 @@
 
 					delete c;
 				}
-				/* Fall through. */
+				/* FALL THROUGH */
 			case 4:
 				this->avails.ForceRebuild();
-				/* Fall through. */
+				/* FALL THROUGH */
 			case 2:
 				this->preset = -1;
-				/* Fall through */
+				/* FALL THROUGH */
 			case 3: {
 				int i = 0;
 				for (const GRFConfig *c = this->actives; c != NULL; c = c->next, i++) {}
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -123,7 +123,7 @@
 
 		case 0xFFFFFFFF: // current grf
 			GrfID = GetIndustrySpec(current->type)->grf_prop.grffile->grfid;
-			/* Fall through */
+			/* FALL THROUGH */
 
 		default: // use the grfid specified in register 100h
 			SetBit(param_setID, 7); // bit 7 means it is not an old type
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -451,7 +451,7 @@
 			if (IsLevelCrossing(tile) && GetCrossingRailBits(tile) == trackbit) {
 				return_cmd_error(STR_ERROR_ALREADY_BUILT);
 			}
-			/* FALLTHROUGH */
+			/* FALL THROUGH */
 		}
 
 		default: {
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -152,7 +152,7 @@
 				if (GB(_m[tile].m5, 4, 2) == ROAD_TILE_CROSSING && HasBit(_m[tile].m3, 7)) {
 					_m[tile].m3 = OWNER_TOWN;
 				}
-				/* FALLTHROUGH */
+				/* FALL THROUGH */
 
 			case MP_TUNNELBRIDGE:
 				if (GetTileOwner(tile) & 0x80) SetTileOwner(tile, OWNER_TOWN);
--- a/src/signal.cpp
+++ b/src/signal.cpp
@@ -501,7 +501,7 @@
 					_tbdset.Add(tile, INVALID_DIAGDIR); // start from depot inside
 					break;
 				}
-				/* FALLTHROUGH */
+				/* FALL THROUGH */
 			case MP_STATION:
 			case MP_ROAD:
 				if ((TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, 0)) & _enterdir_to_trackbits[dir]) != TRACK_BIT_NONE) {
@@ -510,7 +510,7 @@
 					_tbdset.Add(tile + TileOffsByDiagDir(dir), ReverseDiagDir(dir));
 					break;
 				}
-				/* FALLTHROUGH */
+				/* FALL THROUGH */
 			default:
 				/* jump to next tile */
 				tile = tile + TileOffsByDiagDir(dir);
--- a/src/spritecache.cpp
+++ b/src/spritecache.cpp
@@ -551,7 +551,7 @@
 	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?");
-			/* FALLTHROUGH */
+			/* FALL THROUGH */
 		case ST_FONT:
 			return GetRawSprite(SPR_IMG_QUERY, ST_NORMAL);
 		case ST_RECOLOUR:
--- a/src/timetable_gui.cpp
+++ b/src/timetable_gui.cpp
@@ -213,7 +213,7 @@
 				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 */
+				/* FALL THROUGH */
 			case TTV_ARRIVAL_DEPARTURE_SELECTION:
 			case TTV_TIMETABLE_PANEL:
 				resize->height = FONT_HEIGHT_NORMAL;
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -267,7 +267,7 @@
 					this->sel_index = y;
 					this->SetDirty();
 				}
-				/* Fall through to clicking in case we are double-clicked */
+				/* FALL THROUGH, when double-clicking. */
 				if (click_count == 1 || y < 0) break;
 			}
 
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -3639,7 +3639,7 @@
 	 * 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;            // FALLTHROUGH
+		case DIR_NW: x = y;            // FALL THROUGH
 		case DIR_NE: x = ~x + 16;      break;
 		case DIR_E : x = ~x + y + 9;   break;
 		case DIR_SE: x = y;            break;
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -516,7 +516,7 @@
 				BuildRefitList(v, &this->list);
 				this->vscroll.SetCount(this->list.Length());
 			}
-			/* FALLTHROUGH */
+			/* FALL THROUGH */
 
 			case 1: // A new cargo has been selected.
 				this->cargo = (this->sel >= 0 && this->sel < (int)this->list.Length()) ? &this->list[this->sel] : NULL;
@@ -1633,7 +1633,7 @@
 							DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE);
 							break;
 						}
-						/* Fallthrough */
+						/* FALL THROUGH */
 					case VEH_SHIP:
 					case VEH_AIRCRAFT:
 						SetDParam(0, v->GetDisplayMaxSpeed());
@@ -2150,7 +2150,7 @@
 						str = STR_VEHICLE_STATUS_LEAVING;
 						break;
 					}
-					/* fall-through if aircraft. Does this even happen? */
+					/* FALL THROUGH, if aircraft. Does this even happen? */
 
 				default:
 					if (v->GetNumOrders() == 0) {
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -364,7 +364,7 @@
 
 		case WM_PALETTECHANGED:
 			if ((HWND)wParam == hwnd) return 0;
-			/* FALLTHROUGH */
+			/* FALL THROUGH */
 
 		case WM_QUERYNEWPALETTE: {
 			HDC hDC = GetWindowDC(hwnd);
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2200,7 +2200,7 @@
 			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]));
 		}
-		/* Fallthrough */
+		/* FALL THROUGH */
 		case HT_POINT:
 			h0 = TileHeight(start_tile);
 			h1 = TileHeight(end_tile);
@@ -2542,7 +2542,7 @@
 
 		case VPM_X_LIMITED: // Drag in X direction (limited size).
 			limit = (_thd.sizelimit - 1) * TILE_SIZE;
-			/* Fallthrough. */
+			/* FALL THROUGH */
 
 		case VPM_FIX_X: // drag in Y direction
 			x = sx;
@@ -2551,7 +2551,7 @@
 
 		case VPM_Y_LIMITED: // Drag in Y direction (limited size).
 			limit = (_thd.sizelimit - 1) * TILE_SIZE;
-			/* Fallthrough. */
+			/* FALL THROUGH */
 
 		case VPM_FIX_Y: // drag in X direction
 			y = sy;
@@ -2588,7 +2588,7 @@
 			limit = (_thd.sizelimit - 1) * TILE_SIZE;
 			x = sx + Clamp(x - sx, -limit, limit);
 			y = sy + Clamp(y - sy, -limit, limit);
-			/* Fallthrough. */
+			/* FALL THROUGH */
 
 		case VPM_X_AND_Y: { // drag an X by Y area
 			if (_settings_client.gui.measure_tooltip) {
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -1861,7 +1861,7 @@
 		}
 		case WWT_EDITBOX:
 			size.height = max(size.height, GetStringBoundingBox("_").height + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
-			/* fall through */
+			/* FALL THROUGH */
 		case WWT_PUSHBTN: {
 			static const Dimension extra = {WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM};
 			padding = &extra;