summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornikolas <nikolas@gnu.org>2019-01-17 17:01:07 -0500
committerCharles Pigott <charlespigott@googlemail.com>2019-01-17 22:01:07 +0000
commitd8ccad91f9f3c4554908c62a9e250ac61060d1ce (patch)
tree94e5594c72a056e5debaa1eaa66d5e7a5d755c18 /src
parent1623cb553b7d299d0115034609763b6f3063680f (diff)
downloadopenttd-d8ccad91f9f3c4554908c62a9e250ac61060d1ce.tar.xz
Fix: Some code and comment typos
Found with codespell
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp2
-rw-r--r--src/station_cmd.cpp16
-rw-r--r--src/station_gui.cpp2
-rw-r--r--src/tgp.cpp6
-rw-r--r--src/town_cmd.cpp2
-rw-r--r--src/vehicle.cpp2
-rw-r--r--src/viewport.cpp2
-rw-r--r--src/window.cpp2
8 files changed, 17 insertions, 17 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 49d5e8250..65374f439 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -278,7 +278,7 @@ static void ParseResolution(Dimension *res, const char *s)
/**
- * Unitializes drivers, frees allocated memory, cleans pools, ...
+ * Uninitializes drivers, frees allocated memory, cleans pools, ...
* Generally, prepares the game for shutting down
*/
static void ShutdownGame()
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index b4c752360..66a09c435 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1767,16 +1767,16 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
bool distant_join = (station_to_join != INVALID_STATION);
uint8 width = (uint8)GB(p1, 0, 8);
- uint8 lenght = (uint8)GB(p1, 8, 8);
+ uint8 length = (uint8)GB(p1, 8, 8);
/* Check if the requested road stop is too big */
- if (width > _settings_game.station.station_spread || lenght > _settings_game.station.station_spread) return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT);
+ if (width > _settings_game.station.station_spread || length > _settings_game.station.station_spread) return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT);
/* Check for incorrect width / length. */
- if (width == 0 || lenght == 0) return CMD_ERROR;
+ if (width == 0 || length == 0) return CMD_ERROR;
/* Check if the first tile and the last tile are valid */
- if (!IsValidTile(tile) || TileAddWrap(tile, width - 1, lenght - 1) == INVALID_TILE) return CMD_ERROR;
+ if (!IsValidTile(tile) || TileAddWrap(tile, width - 1, length - 1) == INVALID_TILE) return CMD_ERROR;
- TileArea roadstop_area(tile, width, lenght);
+ TileArea roadstop_area(tile, width, length);
if (distant_join && (!_settings_game.station.distant_join_stations || !Station::IsValidID(station_to_join))) return CMD_ERROR;
@@ -3433,7 +3433,7 @@ void RerouteCargo(Station *st, CargoID c, StationID avoid, StationID avoid2)
/* Reroute cargo in station. */
ge.cargo.Reroute(UINT_MAX, &ge.cargo, avoid, avoid2, &ge);
- /* Reroute cargo staged to be transfered. */
+ /* Reroute cargo staged to be transferred. */
for (std::list<Vehicle *>::iterator it(st->loading_vehicles.begin()); it != st->loading_vehicles.end(); ++it) {
for (Vehicle *v = *it; v != NULL; v = v->Next()) {
if (v->cargo_type != c) continue;
@@ -3443,7 +3443,7 @@ void RerouteCargo(Station *st, CargoID c, StationID avoid, StationID avoid2)
}
/**
- * Check all next hops of cargo packets in this station for existance of a
+ * Check all next hops of cargo packets in this station for existence of a
* a valid link they may use to travel on. Reroute any cargo not having a valid
* link and remove timed out links found like this from the linkgraph. We're
* not all links here as that is expensive and useless. A link no one is using
@@ -4230,7 +4230,7 @@ void FlowStat::Invalidate()
}
/**
- * Change share for specified station. By specifing INT_MIN as parameter you
+ * Change share for specified station. By specifying INT_MIN as parameter you
* can erase a share. Newly added flows will be unrestricted.
* @param st Next Hop to be removed.
* @param flow Share to be added or removed.
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 11af2f55f..5c2e06070 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -657,7 +657,7 @@ const CargoTypes CompanyStationsWindow::cargo_filter_max = ALL_CARGOTYPES;
CargoTypes CompanyStationsWindow::cargo_filter = ALL_CARGOTYPES;
const Station *CompanyStationsWindow::last_station = NULL;
-/* Availible station sorting functions */
+/* Available station sorting functions */
GUIStationList::SortFunction * const CompanyStationsWindow::sorter_funcs[] = {
&StationNameSorter,
&StationTypeSorter,
diff --git a/src/tgp.cpp b/src/tgp.cpp
index 436870b41..02621f127 100644
--- a/src/tgp.cpp
+++ b/src/tgp.cpp
@@ -47,7 +47,7 @@
* second sets the major variations to that, ... until finally the smallest
* bumps are added.
*
- * Usefully, this routine is totally scaleable; so when 32bpp comes along, the
+ * Usefully, this routine is totally scalable; so when 32bpp comes along, the
* terrain can be as bumpy as you like! It is also infinitely expandable; a
* single random seed terrain continues in X & Y as far as you care to
* calculate. In theory, we could use just one seed value, but randomly select
@@ -262,7 +262,7 @@ static amplitude_t GetAmplitude(int frequency)
* areas with a particular gradient so that we are able to create maps without too
* many steep slopes up to the wanted height level. It's definitely not perfect since
* it will bring larger rectangles with similar slopes which makes the rectangular
- * behaviour of TGP more noticable. However, these height differentiations cannot
+ * behaviour of TGP more noticeable. However, these height differentiations cannot
* happen over much smaller areas; we basically double the "range" to give a similar
* slope for every doubling of map height.
*/
@@ -977,7 +977,7 @@ static void TgenSetTileHeight(TileIndex tile, int height)
* The main new land generator using Perlin noise. Desert landscape is handled
* different to all others to give a desert valley between two high mountains.
* Clearly if a low height terrain (flat/very flat) is chosen, then the tropic
- * areas wont be high enough, and there will be very little tropic on the map.
+ * areas won't be high enough, and there will be very little tropic on the map.
* Thus Tropic works best on Hilly or Mountainous.
*/
void GenerateTerrainPerlin()
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 4289d901a..986c52c4e 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2945,7 +2945,7 @@ static CommandCost TownActionFundBuildings(Town *t, DoCommandFlag flags)
* Also emulate original behaviour when town was only growing in
* TOWN_GROWTH_TICKS intervals, to make sure that it's not too
* tick-perfect and gives player some time window where he can
- * spam funding with the exact same effeciency.
+ * spam funding with the exact same efficiency.
*/
t->grow_counter = min(t->grow_counter, 2 * TOWN_GROWTH_TICKS - (t->growth_rate - t->grow_counter) % TOWN_GROWTH_TICKS);
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 9015396a8..1ed43c9b6 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -723,7 +723,7 @@ bool Vehicle::IsEngineCountable() const
/**
* Check whether Vehicle::engine_type has any meaning.
- * @return true if the vehicle has a useable engine type.
+ * @return true if the vehicle has a usable engine type.
*/
bool Vehicle::HasEngineType() const
{
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 350bb9238..da4ed2660 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -58,7 +58,7 @@
*
*
* Rows are horizontal sections of the viewport, also half a tile wide.
- * This time the nothern most tile on the map defines 0 and
+ * This time the northern most tile on the map defines 0 and
* everything south of that has a positive number.
*/
diff --git a/src/window.cpp b/src/window.cpp
index d67c7f2f7..cc40afd34 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -655,7 +655,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count)
/* Clicked on a widget that is not disabled.
* So unless the clicked widget is the caption bar, change focus to this widget.
- * Exception: In the OSK we always want the editbox to stay focussed. */
+ * Exception: In the OSK we always want the editbox to stay focused. */
if (widget_type != WWT_CAPTION && w->window_class != WC_OSK) {
/* focused_widget_changed is 'now' only true if the window this widget
* is in gained focus. In that case it must remain true, also if the