From bbe5dbf2302df6a613d4e2bf65902e8463c394fa Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 26 Apr 2026 23:03:00 +0100 Subject: [PATCH] Cleanup: Correct various spelling errors --- src/3rdparty/icu/scriptrun.cpp | 2 +- src/3rdparty/squirrel/squirrel/sqapi.cpp | 6 +++--- src/3rdparty/squirrel/squirrel/sqbaselib.cpp | 2 +- src/3rdparty/squirrel/squirrel/sqobject.cpp | 2 +- src/3rdparty/squirrel/squirrel/sqstate.cpp | 4 ++-- src/3rdparty/squirrel/squirrel/sqvm.cpp | 2 +- src/blitter/32bpp_sse_func.hpp | 2 +- src/blitter/base.hpp | 2 +- src/core/geometry_type.hpp | 10 +++++----- src/core/kdtree.hpp | 4 ++-- src/economy_type.h | 8 ++++---- src/fileio.cpp | 2 +- src/game/game_gui.cpp | 2 +- src/hotkeys.cpp | 2 +- src/landscape.cpp | 4 ++-- src/linkgraph/linkgraphjob.h | 2 +- src/network/core/packet.h | 2 +- src/newgrf.cpp | 2 +- src/newgrf.h | 2 +- src/newgrf/newgrf_act0_industries.cpp | 2 +- src/newgrf_object.cpp | 2 +- src/newgrf_profiling.cpp | 2 +- src/newgrf_spritegroup.h | 2 +- src/newgrf_station.cpp | 2 +- src/newgrf_text.cpp | 2 +- src/order_base.h | 4 ++-- src/os/macosx/macos_objective_c.h | 2 +- src/roadveh_cmd.cpp | 2 +- src/script/script_gui.cpp | 2 +- src/sortlist_type.h | 2 +- src/table/build_industry.h | 2 +- src/timer/timer_game_common.h | 2 +- src/toolbar_gui.cpp | 2 +- src/town_cmd.cpp | 2 +- src/train_cmd.cpp | 2 +- src/vehicle_cmd.cpp | 2 +- src/vehicle_gui.cpp | 2 +- src/video/cocoa/cocoa_v.mm | 2 +- src/viewport.cpp | 2 +- 39 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/3rdparty/icu/scriptrun.cpp b/src/3rdparty/icu/scriptrun.cpp index 22bcb7e8db..123cbbe910 100644 --- a/src/3rdparty/icu/scriptrun.cpp +++ b/src/3rdparty/icu/scriptrun.cpp @@ -152,7 +152,7 @@ UBool ScriptRun::next() // if it's an open character, push it onto the stack. // if it's a close character, find the matching open on the // stack, and use that script code. Any non-matching open - // characters above it on the stack will be poped. + // characters above it on the stack will be popped. if (pairIndex >= 0) { if ((pairIndex & 1) == 0) { parenStack[++parenSP].pairIndex = pairIndex; diff --git a/src/3rdparty/squirrel/squirrel/sqapi.cpp b/src/3rdparty/squirrel/squirrel/sqapi.cpp index da031552e7..16fa11d91e 100644 --- a/src/3rdparty/squirrel/squirrel/sqapi.cpp +++ b/src/3rdparty/squirrel/squirrel/sqapi.cpp @@ -472,7 +472,7 @@ SQRESULT sq_setroottable(HSQUIRRELVM v) v->Pop(); return SQ_OK; } - return sq_throwerror(v, "ivalid type"); + return sq_throwerror(v, "invalid type"); } SQRESULT sq_setconsttable(HSQUIRRELVM v) @@ -483,7 +483,7 @@ SQRESULT sq_setconsttable(HSQUIRRELVM v) v->Pop(); return SQ_OK; } - return sq_throwerror(v, "ivalid type, expected table"); + return sq_throwerror(v, "invalid type, expected table"); } void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p) @@ -796,7 +796,7 @@ SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx) switch(type) { case OT_TABLE: if(type(mt) == OT_TABLE) { - if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, "delagate cycle"); + if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, "delegate cycle"); v->Pop();} else if(type(mt)==OT_NULL) { _table(self)->SetDelegate(nullptr); v->Pop(); } diff --git a/src/3rdparty/squirrel/squirrel/sqbaselib.cpp b/src/3rdparty/squirrel/squirrel/sqbaselib.cpp index 0b3782a52a..d43ef7c027 100644 --- a/src/3rdparty/squirrel/squirrel/sqbaselib.cpp +++ b/src/3rdparty/squirrel/squirrel/sqbaselib.cpp @@ -554,7 +554,7 @@ bool _hsort_sift_down(HSQUIRRELVM v,SQArray *arr, SQInteger root, SQInteger bott if (ret < 0) { if (root == maxChild) { v->Raise_Error("inconsistent compare function"); - return false; // We'd be swapping ourselve. The compare function is incorrect + return false; // We'd be swapping ourself. The compare function is incorrect } _Swap(arr->_values[root],arr->_values[maxChild]); root = maxChild; diff --git a/src/3rdparty/squirrel/squirrel/sqobject.cpp b/src/3rdparty/squirrel/squirrel/sqobject.cpp index 668da50a92..d1ba97969f 100644 --- a/src/3rdparty/squirrel/squirrel/sqobject.cpp +++ b/src/3rdparty/squirrel/squirrel/sqobject.cpp @@ -245,7 +245,7 @@ bool SafeWrite(HSQUIRRELVM v,SQWRITEFUNC write,SQUserPointer up,SQUserPointer de bool SafeRead(HSQUIRRELVM v,SQWRITEFUNC read,SQUserPointer up,SQUserPointer dest,SQInteger size) { if(size && read(up,dest,size) != size) { - v->Raise_Error("io error, read function failure, the origin stream could be corrupted/trucated"); + v->Raise_Error("io error, read function failure, the origin stream could be corrupted/truncated"); return false; } return true; diff --git a/src/3rdparty/squirrel/squirrel/sqstate.cpp b/src/3rdparty/squirrel/squirrel/sqstate.cpp index 30306a075a..24dc7020de 100644 --- a/src/3rdparty/squirrel/squirrel/sqstate.cpp +++ b/src/3rdparty/squirrel/squirrel/sqstate.cpp @@ -193,7 +193,7 @@ SQSharedState::~SQSharedState() t = nx; } } -// assert(_gc_chain==nullptr); //just to proove a theory +// assert(_gc_chain==nullptr); //just to prove a theory while(_gc_chain){ _gc_chain->_uiRef--; _gc_chain->Release(); @@ -227,7 +227,7 @@ SQInteger SQSharedState::GetMetaMethodIdxByName(const SQObjectPtr &name) * This is done internally by a vector onto which the to be freed instances are pushed. When * this is called when not already processing, this method will actually call the FinalFree * function which might cause more elements to end up in the queue which this method then - * picks up continueing until it has processed all instances in that queue. + * picks up continuing until it has processed all instances in that queue. * @param collectable The collectable to (eventually) free. */ void SQSharedState::DelayFinalFree(SQCollectable *collectable) diff --git a/src/3rdparty/squirrel/squirrel/sqvm.cpp b/src/3rdparty/squirrel/squirrel/sqvm.cpp index 8c1d3cae5d..e8c123f07c 100644 --- a/src/3rdparty/squirrel/squirrel/sqvm.cpp +++ b/src/3rdparty/squirrel/squirrel/sqvm.cpp @@ -424,7 +424,7 @@ bool SQVM::Return(SQInteger _arg0, SQInteger _arg1, SQObjectPtr &retval) else retval = _null_; } else { - if(target != -1) { //-1 is when a class contructor ret value has to be ignored + if(target != -1) { //-1 is when a class constructor ret value has to be ignored if (_arg0 != MAX_FUNC_STACKSIZE) STK(target) = _stack._vals[oldstackbase+_arg1]; else diff --git a/src/blitter/32bpp_sse_func.hpp b/src/blitter/32bpp_sse_func.hpp index a7bd481403..b25fb6e0d3 100644 --- a/src/blitter/32bpp_sse_func.hpp +++ b/src/blitter/32bpp_sse_func.hpp @@ -17,7 +17,7 @@ #ifndef BLITTER_32BPP_SSE_FUNC_HPP #define BLITTER_32BPP_SSE_FUNC_HPP -/** Prefix all things in this file wiht this specifier to make them linked internally only. */ +/** Prefix all things in this file with this specifier to make them linked internally only. */ #define INTERNAL_LINKAGE static #ifdef WITH_SSE diff --git a/src/blitter/base.hpp b/src/blitter/base.hpp index f8838f0ec2..e8b20bea9d 100644 --- a/src/blitter/base.hpp +++ b/src/blitter/base.hpp @@ -192,7 +192,7 @@ public: /** * Does this blitter require a separate animation buffer from the video backend? - * @return \c true when the backend usees a separate buffer for animation. + * @return \c true when the backend uses a separate buffer for animation. */ virtual bool NeedsAnimationBuffer() { diff --git a/src/core/geometry_type.hpp b/src/core/geometry_type.hpp index efab749d83..6f5c512d1d 100644 --- a/src/core/geometry_type.hpp +++ b/src/core/geometry_type.hpp @@ -28,7 +28,7 @@ inline int CentreBounds(int min, int max, int size) return (min + max - size + 1) / 2; } -/** A coordinate with two dimensons. */ +/** A coordinate with two dimensions. */ template struct Coord2D { T x = 0; ///< X coordinate. @@ -264,7 +264,7 @@ struct Rect { } /** - * Create a new Rect, replacing the left and right coordiates. + * Create a new Rect, replacing the left and right coordinates. * @param new_left New left coordinate. * @param new_right New right coordinate. * @return The new Rect. @@ -272,7 +272,7 @@ struct Rect { [[nodiscard]] inline Rect WithX(int new_left, int new_right) const { return {new_left, this->top, new_right, this->bottom}; } /** - * Create a new Rect, replacing the top and bottom coordiates. + * Create a new Rect, replacing the top and bottom coordinates. * @param new_top New top coordinate. * @param new_bottom New bottom coordinate. * @return The new Rect. @@ -280,14 +280,14 @@ struct Rect { [[nodiscard]] inline Rect WithY(int new_top, int new_bottom) const { return {this->left, new_top, this->right, new_bottom}; } /** - * Create a new Rect, replacing the left and right coordiates. + * Create a new Rect, replacing the left and right coordinates. * @param other Rect containing the new left and right coordinates. * @return The new Rect. */ [[nodiscard]] inline Rect WithX(const Rect &other) const { return this->WithX(other.left, other.right); } /** - * Create a new Rect, replacing the top and bottom coordiates. + * Create a new Rect, replacing the top and bottom coordinates. * @param other Rect containing the new top and bottom coordinates. * @return The new Rect. */ diff --git a/src/core/kdtree.hpp b/src/core/kdtree.hpp index 9b38e82867..215c8437b4 100644 --- a/src/core/kdtree.hpp +++ b/src/core/kdtree.hpp @@ -335,7 +335,7 @@ class Kdtree { * Debugging function, counts number of occurrences of an element regardless of its correct position in the tree. * @param element The element to look for. * @param node_idx The root to start searching from. - * @return The number of occurences. + * @return The number of occurrences. */ size_t CountValue(const T &element, size_t node_idx) const { @@ -447,7 +447,7 @@ public: * Insert a single element in the tree. * Repeatedly inserting single elements may cause the tree to become unbalanced. * Undefined behaviour if the element already exists in the tree. - * @param element The elemnt to add. + * @param element The element to add. */ void Insert(const T &element) { diff --git a/src/economy_type.h b/src/economy_type.h index d3e9afcf53..72131382ec 100644 --- a/src/economy_type.h +++ b/src/economy_type.h @@ -63,10 +63,10 @@ enum class ScoreID : uint8_t { Vehicles = ScoreID::Begin, ///< Number of vehicles that turned profit last year. Stations, ///< Number of recently-serviced stations. MinProfit, ///< The profit of the vehicle with the lowest income. - MinIncome, ///< Income in the quater with the lowest profit of the last 12 quaters. - MaxIncome, ///< Income in the quater with the highest profit of the last 12 quaters. - Delivered, ///< Units of cargo delivered in the last four quaters. - Cargo, ///< Number of types of cargo delivered in the last four quaters. + MinIncome, ///< Income in the quarter with the lowest profit of the last 12 quarters. + MaxIncome, ///< Income in the quarter with the highest profit of the last 12 quarters. + Delivered, ///< Units of cargo delivered in the last four quarter. + Cargo, ///< Number of types of cargo delivered in the last four quarter. Money, ///< Amount of money company has in the bank. Loan, ///< The amount of money company can take as a loan. Total, ///< Total points out of possible points ,must always be the last entry. diff --git a/src/fileio.cpp b/src/fileio.cpp index f1fc868e08..3a770fcd49 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -669,7 +669,7 @@ bool ExtractTar(const std::string &tar_filename, Subdirectory subdir) */ extern void DetermineBasePaths(std::string_view exe); -/** Mimicks the getcwd from POSIX for Windows. */ +/** Mimics the getcwd from POSIX for Windows. */ char *getcwd(char *buf, size_t size); #else /* defined(_WIN32) */ diff --git a/src/game/game_gui.cpp b/src/game/game_gui.cpp index 2717faedb1..767050b3f9 100644 --- a/src/game/game_gui.cpp +++ b/src/game/game_gui.cpp @@ -95,7 +95,7 @@ struct GSConfigWindow : public Window { bool closing_dropdown = false; ///< True, if the dropdown list is currently closing. int clicked_row = 0; ///< The clicked row of settings. Scrollbar *vscroll = nullptr; ///< Cache of the vertical scrollbar. - typedef std::vector VisibleSettingsList; ///< typdef for a vector of script settings + typedef std::vector VisibleSettingsList; ///< typedef for a vector of script settings VisibleSettingsList visible_settings{}; ///< List of visible GS settings GSConfigWindow() : Window(_gs_config_desc) diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp index 1d9f019dcd..2ea93adae9 100644 --- a/src/hotkeys.cpp +++ b/src/hotkeys.cpp @@ -257,7 +257,7 @@ HotkeyList::HotkeyList(const std::string &ini_group, const std::vector & _hotkey_lists->push_back(this); } -/** Remove outselves from the global hotkey list. */ +/** Remove ourselves from the global hotkey list. */ HotkeyList::~HotkeyList() { _hotkey_lists->erase(std::ranges::find(*_hotkey_lists, this)); diff --git a/src/landscape.cpp b/src/landscape.cpp index d439e867d5..aebd39ebdc 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -1141,7 +1141,7 @@ static void MakeWetlands(TileIndex centre, uint height, uint river_length) * Try to end a river at a tile which is not the sea. * @param tile The tile to try ending the river at. * @param begin The starting tile of the river. - * @return Whether we succesfully ended the river on the given tile. + * @return Whether we successfully ended the river on the given tile. */ static bool TryMakeRiverTerminus(TileIndex tile, TileIndex begin) { @@ -1364,7 +1364,7 @@ static bool CountConnectedSeaTiles(TileIndex tile, std::unordered_set * Count this tile but don't check its neighbors. */ if (sea.size() > limit) return false; - /* Count adjacent tiles using recusion. */ + /* Count adjacent tiles using recursion. */ for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) { TileIndex t = tile + TileOffsByDiagDir(d); if (IsValidTile(t) && !sea.contains(t)) { diff --git a/src/linkgraph/linkgraphjob.h b/src/linkgraph/linkgraphjob.h index 6c38ff7213..71c7b6af4f 100644 --- a/src/linkgraph/linkgraphjob.h +++ b/src/linkgraph/linkgraphjob.h @@ -388,7 +388,7 @@ protected: /** @} */ uint distance = 0; ///< Sum(distance of all legs up to this one). - uint capacity = 0; ///< This capacity is min(capacity) fom all edges. + uint capacity = 0; ///< This capacity is min(capacity) of all edges. int free_capacity = 0; ///< This capacity is min(edge.capacity - edge.flow) for the current run of Dijkstra. uint flow = 0; ///< Flow the current run of the mcf solver assigns. NodeID node = INVALID_NODE; ///< Link graph node this leg passes. diff --git a/src/network/core/packet.h b/src/network/core/packet.h index b6317eaca7..a66d7e76a5 100644 --- a/src/network/core/packet.h +++ b/src/network/core/packet.h @@ -27,7 +27,7 @@ typedef uint8_t PacketType; ///< Identifier for the packet * identifier is unique for each stream of packets, which are separate enumerations. * This trait allows us to only allow one of these PacketType enumerations when * creating the packet, but not any other enumeration. It is up to the developer to - * enusre that the right enumeration is used for a socket handler. + * ensure that the right enumeration is used for a socket handler. */ template struct IsEnumPacketType { diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 581d899285..19a1293dba 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -448,7 +448,7 @@ void ResetNewGRFData() /* Reset price base data */ ResetPriceBaseMultipliers(); - /* Reset the curencies array */ + /* Reset the currencies array */ ResetCurrencies(); /* Reset the house array */ diff --git a/src/newgrf.h b/src/newgrf.h index bdfe87eede..6446e4361c 100644 --- a/src/newgrf.h +++ b/src/newgrf.h @@ -60,7 +60,7 @@ DECLARE_INCREMENT_DECREMENT_OPERATORS(GrfLoadingStage) enum class GrfMiscBit : uint8_t { DesertTreesFields = 0, ///< Unsupported: allow trees and fields in desert climate. DesertPavedRoads = 1, ///< Show pavement and lights in desert towns - FieldBoundingBox = 2, ///< Unsupported: fiels have a height. + FieldBoundingBox = 2, ///< Unsupported: fields have a height. TrainWidth32Pixels = 3, ///< Use 32 pixels per train vehicle in depot gui and vehicle details. Never set in the global variable; @see GRFFile::traininfo_vehicle_width AmbientSoundCallback = 4, ///< Enable ambient sound effect callback 144. CatenaryOn3rdTrack = 5, ///< Unsupported: enable catenaries over third track type. diff --git a/src/newgrf/newgrf_act0_industries.cpp b/src/newgrf/newgrf_act0_industries.cpp index 8a6b36f994..3e6cb976c8 100644 --- a/src/newgrf/newgrf_act0_industries.cpp +++ b/src/newgrf/newgrf_act0_industries.cpp @@ -529,7 +529,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint first, uint last, int prop, By indsp->accepts_cargo[j] = GetCargoTranslation(buf.ReadByte(), _cur_gps.grffile); indsp->accepts_cargo_label[j] = CT_INVALID; } - buf.ReadByte(); // Unnused, eat it up + buf.ReadByte(); // Unused, eat it up break; case 0x12: // Production multipliers diff --git a/src/newgrf_object.cpp b/src/newgrf_object.cpp index a74122530e..d6cbb22545 100644 --- a/src/newgrf_object.cpp +++ b/src/newgrf_object.cpp @@ -379,7 +379,7 @@ unhandled: /** * Constructor of the object resolver. * @param obj Object being resolved. - * @param spec Specifiction of the object's type. + * @param spec Specification of the object's type. * @param tile %Tile of the object. * @param view View of the object. * @param callback Callback ID. diff --git a/src/newgrf_profiling.cpp b/src/newgrf_profiling.cpp index b977e83f5b..d4b118a8b6 100644 --- a/src/newgrf_profiling.cpp +++ b/src/newgrf_profiling.cpp @@ -184,7 +184,7 @@ static TimeoutTimer _profiling_finish_timeout({ TimerGameTick::Pr /** * Start the timeout timer that will finish all profiling sessions. - * @param ticks The timemout in game ticks. + * @param ticks The timeout in game ticks. */ /* static */ void NewGRFProfiler::StartTimer(uint64_t ticks) { diff --git a/src/newgrf_spritegroup.h b/src/newgrf_spritegroup.h index ec99f251f3..a36342a3f3 100644 --- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -494,7 +494,7 @@ struct SpecializedResolverObject : public ResolverObject { /** * Set waiting triggers for rerandomisation. * This is scope independent, even though this is broken-by-design in most cases. - * @param triggers The triggers to set wating. + * @param triggers The triggers to set waiting. */ void SetWaitingRandomTriggers(RandomTriggers triggers) { diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 34424f1358..77cf142221 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -905,7 +905,7 @@ const StationSpec *GetStationSpec(TileIndex t) * @param param1 The first parameter of the NewGRF callback. * @param param2 The second parameter of the NewGRF callback. * @param statspec The specification to run the callback on. - * @param st The station for the calback. + * @param st The station for the callback. * @param tile The tile the station is at. * @return The NewGRF result of the callback. */ diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp index 9368b33c8a..4c24d627ec 100644 --- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -539,7 +539,7 @@ void AddGRFTextToList(GRFTextWrapper &list, std::string_view text_to_add) * @param allow_newlines Whether newlines are allowed in the string. * @param text_to_add The actual text of the string. * @param def_string The fallback string if a translation for this string isn't available. - * @return The OpenTTD internal string identifer. + * @return The OpenTTD internal string identifier. */ StringID AddGRFString(uint32_t grfid, GRFStringID stringid, uint8_t langid_to_add, bool new_scheme, bool allow_newlines, std::string_view text_to_add, StringID def_string) { diff --git a/src/order_base.h b/src/order_base.h index 01c50d0804..31d6ef4ee7 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -300,7 +300,7 @@ public: inline uint16_t GetTravelTime() const { return this->travel_time; } /** - * Get the maxmimum speed in km-ish/h a vehicle is allowed to reach on the way to the + * Get the maximum speed in km-ish/h a vehicle is allowed to reach on the way to the * destination. * @return maximum speed. */ @@ -331,7 +331,7 @@ public: inline void SetTravelTime(uint16_t time) { this->travel_time = time; } /** - * Set the maxmimum speed in km-ish/h a vehicle is allowed to reach on the way to the + * Set the maximum speed in km-ish/h a vehicle is allowed to reach on the way to the * destination. * @param speed Speed to be set. */ diff --git a/src/os/macosx/macos_objective_c.h b/src/os/macosx/macos_objective_c.h index 422e3b88b8..f188d7f050 100644 --- a/src/os/macosx/macos_objective_c.h +++ b/src/os/macosx/macos_objective_c.h @@ -5,7 +5,7 @@ * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . */ -/** @file macos_objective_c.h Includes of mac os specific headers wich contain objective c. */ +/** @file macos_objective_c.h Includes of mac os specific headers which contain objective c. */ #ifndef MACOS_OBJECTIVE_C_H #define MACOS_OBJECTIVE_C_H diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 30f8f90e4b..a8f633b06b 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1718,7 +1718,7 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } -/** Calander day handler */ +/** Calender day handler */ void RoadVehicle::OnNewCalendarDay() { if (!this->IsFrontEngine()) return; diff --git a/src/script/script_gui.cpp b/src/script/script_gui.cpp index 64e3d5c222..8b11ad656d 100644 --- a/src/script/script_gui.cpp +++ b/src/script/script_gui.cpp @@ -295,7 +295,7 @@ struct ScriptSettingsWindow : public Window { int clicked_row = 0; ///< The clicked row of settings. int line_height = 0; ///< Height of a row in the matrix widget. Scrollbar *vscroll = nullptr; ///< Cache of the vertical scrollbar. - typedef std::vector VisibleSettingsList; ///< typdef for a vector of script settings + typedef std::vector VisibleSettingsList; ///< typedef for a vector of script settings VisibleSettingsList visible_settings{}; ///< List of visible AI settings /** diff --git a/src/sortlist_type.h b/src/sortlist_type.h index 7786463441..30eb9a8d92 100644 --- a/src/sortlist_type.h +++ b/src/sortlist_type.h @@ -36,7 +36,7 @@ struct Filtering { /** * List template of 'things' \p T to sort in a GUI. * @tparam T Type of data stored in the list to represent each item. - * @tparam P Tyoe of data passed as additional parameter to the sort function. + * @tparam P Type of data passed as additional parameter to the sort function. * @tparam F Type of data fed as additional value to the filter function. @see FilterFunction */ template diff --git a/src/table/build_industry.h b/src/table/build_industry.h index 1da04069c9..208abf2be9 100644 --- a/src/table/build_industry.h +++ b/src/table/build_industry.h @@ -1578,7 +1578,7 @@ static const IndustryTileSpec _origin_industry_tile_specs[NEW_INDUSTRYTILEOFFSET MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), - /* Oil Wells artic, temperate and sub-tropical */ + /* Oil Wells arctic, temperate and sub-tropical */ MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, false), MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, true ), MT(0, CT_INVALID, 0, CT_INVALID, 0, CT_INVALID, SLOPE_STEEP, INDUSTRYTILE_NOANIM, INDUSTRYTILE_NOANIM, true ), diff --git a/src/timer/timer_game_common.h b/src/timer/timer_game_common.h index 91a81b20c1..324b4c97bf 100644 --- a/src/timer/timer_game_common.h +++ b/src/timer/timer_game_common.h @@ -98,7 +98,7 @@ public: /** Trigger reasons for the timer based triggers. */ enum class Trigger : uint8_t { - Day, ///< Triggeres daily. + Day, ///< Triggers daily. Week, ///< Triggers every Tuesday. Month, ///< Triggered at the first of the month. Quarter, ///< Triggered every first of January, April, July and October. diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index b24b6383fb..77c8f69dc3 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -85,7 +85,7 @@ RoadType _last_built_tramtype; /** Toolbar modes */ enum class ToolbarMode : uint8_t { - Normal, ///< Toolbar is in normal mode, in wich all 30 buttons are accessible. + Normal, ///< Toolbar is in normal mode, in which all 30 buttons are accessible. Upper, ///< Toolbar is in split mode and the first part is selected. Lower, ///< Toolbar is in split mode and the second part is selected. }; diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 270874fbdc..2a1d9ba035 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -3828,7 +3828,7 @@ static void UpdateTownRating(Town *t) /** * Updates town grow counter after growth rate change. - * Preserves relative house builting progress whenever it can. + * Preserves relative house building progress whenever it can. * @param t The town to calculate grow counter for * @param prev_growth_rate Town growth rate before it changed (one that was used with grow counter to be updated) */ diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index e92c01fd2f..365232aafe 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2586,7 +2586,7 @@ static PBSTileInfo ExtendTrainReservation(const Train *v, TrackBits *new_tracks, * On finding a possible target, we need to stop and let the pathfinder handle the * remaining path. This is because we don't know if this target is in one of our * orders, so we might cause pathfinding to fail later on if we find a choice. - * This failure would cause a bogous call to TryReserveSafePath which might reserve + * This failure would cause a bogus call to TryReserveSafePath which might reserve * a wrong path not leading to our next destination. */ if (HasReservedTracks(ft.new_tile, TrackdirBitsToTrackBits(TrackdirReachesTrackdirs(ft.old_td)))) break; diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 6d88e6e3f0..29029292dc 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -440,7 +440,7 @@ static std::tuple RefitVehicle(Vehicle CommandCost refit_cost = GetRefitCost(v, v->engine_type, new_cargo_type, actual_subtype, &auto_refit_allowed); if (auto_refit && !flags.Test(DoCommandFlag::QueryCost) && !auto_refit_allowed) { /* Sorry, auto-refitting not allowed, subtract the cargo amount again from the total. - * When querrying cost/capacity (for example in order refit GUI), we always assume 'allowed'. + * When querying cost/capacity (for example in order refit GUI), we always assume 'allowed'. * It is not predictable. */ total_capacity -= amount; total_mail_capacity -= mail_capacity; diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 8a9cebfe1f..26525e447e 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -3413,7 +3413,7 @@ public: } } - /** Selects apropriate plane for current state of the shown vehicle. */ + /** Selects appropriate plane for current state of the shown vehicle. */ void UpdatePlanes() { const Vehicle *v = Vehicle::Get(this->window_number); diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index ccf2819d1b..572126632c 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -117,7 +117,7 @@ std::optional VideoDriver_Cocoa::Initialize() /** * Set dirty a rectangle managed by a cocoa video subdriver. - * @param left Left x cooordinate of the dirty rectangle. + * @param left Left x coordinate of the dirty rectangle. * @param top Upper y coordinate of the dirty rectangle. * @param width Width of the dirty rectangle. * @param height Height of the dirty rectangle. diff --git a/src/viewport.cpp b/src/viewport.cpp index 74e3259ae9..a582b5493a 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1945,7 +1945,7 @@ static inline void ClampViewportToMap(const Viewport &vp, int *scroll_x, int *sc } /** - * Clamp the smooth scroll to a maxmimum speed and distance based on time elapsed. + * Clamp the smooth scroll to a maximum speed and distance based on time elapsed. * * Every 30ms, we move 1/4th of the distance, to give a smooth movement experience. * But we never go over the max_scroll speed.