From 7c0f69a8fe0cbb444ecb3b89e2de2fecaefd40d1 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sun, 31 Aug 2025 09:28:04 +0200 Subject: [PATCH] Codefix: typos in comments and strings --- src/aircraft_cmd.cpp | 2 +- src/autoreplace_cmd.cpp | 2 +- src/autoreplace_gui.cpp | 4 +-- src/base_station_base.h | 2 +- src/cargopacket.h | 2 +- src/command_type.h | 2 +- src/company_cmd.cpp | 4 +-- src/core/string_consumer.hpp | 12 ++++---- src/currency.h | 2 +- src/effectvehicle_func.h | 2 +- src/engine.cpp | 4 +-- src/engine_base.h | 2 +- src/genworld.cpp | 2 +- src/gfx.cpp | 2 +- src/graph_gui.cpp | 2 +- src/group_cmd.cpp | 2 +- src/highscore.h | 2 +- src/industry_cmd.cpp | 6 ++-- src/industry_map.h | 2 +- src/linkgraph/linkgraphjob.cpp | 2 +- src/main_gui.cpp | 6 ++-- src/music/midi.h | 4 +-- src/network/core/address.cpp | 2 +- src/network/core/http_winhttp.cpp | 4 +-- src/network/core/network_game_info.cpp | 2 +- src/network/network_admin.cpp | 2 +- src/network/network_client.cpp | 2 +- src/network/network_coordinator.cpp | 2 +- src/network/network_crypto.cpp | 2 +- src/network/network_gui.cpp | 6 ++-- src/newgrf.cpp | 2 +- src/newgrf/newgrf_act0_cargo.cpp | 2 +- src/newgrf/newgrf_act0_globalvar.cpp | 2 +- src/newgrf/newgrf_act0_industries.cpp | 2 +- src/newgrf/newgrf_act7_9.cpp | 4 +-- src/newgrf_act5.h | 2 +- src/newgrf_badge_gui.cpp | 4 +-- src/newgrf_commons.h | 2 +- src/newgrf_engine.cpp | 4 +-- src/order_gui.cpp | 2 +- src/os/macosx/string_osx.cpp | 8 ++--- src/palette.cpp | 2 +- src/pathfinder/yapf/yapf_road.cpp | 2 +- src/picker_gui.h | 2 +- src/random_access_file_type.h | 2 +- src/road_cmd.cpp | 2 +- src/roadveh_cmd.cpp | 2 +- src/saveload/afterload.cpp | 2 +- src/saveload/oldloader_sl.cpp | 2 +- src/screenshot.cpp | 2 +- src/script/api/script_object.cpp | 2 +- src/script/api/script_object.hpp | 4 +-- src/script/api/script_order.hpp | 2 +- src/script/api/script_story_page.hpp | 2 +- src/script/api/script_subsidy.hpp | 2 +- src/script/api/script_tile.hpp | 4 +-- src/script/api/script_vehicle.hpp | 4 +-- src/sound/xaudio2_s.cpp | 2 +- src/station_gui.cpp | 2 +- src/strings_internal.h | 2 +- src/subsidy_base.h | 2 +- src/table/airport_defaults.h | 2 +- src/table/settings/locale_settings.ini | 2 +- src/table/sprites.h | 2 +- src/tests/test_script_admin.cpp | 2 +- src/tilearea_type.h | 2 +- src/toolbar_gui.cpp | 42 +++++++++++++------------- src/town.h | 2 +- src/town_cmd.cpp | 6 ++-- src/town_gui.cpp | 2 +- src/tunnelbridge_cmd.cpp | 2 +- src/vehicle_base.h | 4 +-- src/vehicle_cmd.cpp | 2 +- src/video/cocoa/cocoa_v.mm | 2 +- src/viewport.cpp | 6 ++-- src/widget.cpp | 4 +-- src/widget_type.h | 2 +- src/window.cpp | 14 ++++----- 78 files changed, 135 insertions(+), 135 deletions(-) diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index caee30d933..7a1b8b7a8c 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -1674,7 +1674,7 @@ static void AircraftEventHandler_Flying(Aircraft *v, const AirportFTAClass *apc) if (current->heading == landingtype) { /* save speed before, since if AirportHasBlock is false, it resets them to 0 * we don't want that for plane in air - * hack for speed thingie */ + * hack for speed thingy */ uint16_t tcur_speed = v->cur_speed; uint16_t tsubspeed = v->subspeed; if (!AirportHasBlock(v, current, apc)) { diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index df64561cf3..3ff1515b01 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -435,7 +435,7 @@ static CommandCost CopyHeadSpecificThings(Vehicle *old_head, Vehicle *new_head, /* Last do those things which do never fail (resp. we do not care about), but which are not undo-able */ if (cost.Succeeded() && old_head != new_head && flags.Test(DoCommandFlag::Execute)) { - /* Copy other things which cannot be copied by a command and which shall not stay resetted from the build vehicle command */ + /* Copy other things which cannot be copied by a command and which shall not stay reset from the build vehicle command */ new_head->CopyVehicleConfigAndStatistics(old_head); GroupStatistics::AddProfitLastYear(new_head); diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 73ed7b0846..58fb5124d5 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -562,8 +562,8 @@ public: this->HandleButtonClick(WID_RV_START_REPLACE); ReplaceClick_StartReplace(false); } else { - bool replacment_when_old = EngineHasReplacementWhenOldForCompany(Company::Get(_local_company), this->sel_engine[0], this->sel_group); - ShowDropDownMenu(this, _start_replace_dropdown, replacment_when_old ? 1 : 0, WID_RV_START_REPLACE, !this->replace_engines ? 1 << 1 : 0, 0); + bool replacement_when_old = EngineHasReplacementWhenOldForCompany(Company::Get(_local_company), this->sel_engine[0], this->sel_group); + ShowDropDownMenu(this, _start_replace_dropdown, replacement_when_old ? 1 : 0, WID_RV_START_REPLACE, !this->replace_engines ? 1 << 1 : 0, 0); } break; } diff --git a/src/base_station_base.h b/src/base_station_base.h index fadf565127..229c7f90aa 100644 --- a/src/base_station_base.h +++ b/src/base_station_base.h @@ -243,7 +243,7 @@ struct SpecializedStation : public BaseStation { /** * Gets station with given index - * @return pointer to station with given index casted to T * + * @return pointer to station with given index cast to T * */ static inline T *Get(auto index) { diff --git a/src/cargopacket.h b/src/cargopacket.h index 0078eb6480..8b4c7b6d40 100644 --- a/src/cargopacket.h +++ b/src/cargopacket.h @@ -571,7 +571,7 @@ public: } /** - * Returns sum of cargo still available for loading at the sation. + * Returns sum of cargo still available for loading at the station. * (i.e. not counting cargo which is already reserved for loading) * @return Cargo on board the vehicle. */ diff --git a/src/command_type.h b/src/command_type.h index e491677871..893a03d44c 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -24,7 +24,7 @@ struct GRFFile; class CommandCost { Money cost; ///< The cost of this action StringID message; ///< Warning message for when success is unset - ExpensesType expense_type; ///< the type of expence as shown on the finances view + ExpensesType expense_type; ///< the type of expense as shown on the finances view bool success; ///< Whether the command went fine up to this moment Owner owner = CompanyID::Invalid(); ///< Originator owner of error. StringID extra_message = INVALID_STRING_ID; ///< Additional warning message for when success is unset diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index e1c38ee285..e9fc5f94ff 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -196,7 +196,7 @@ static bool IsValidCompanyManagerFace(CompanyManagerFace cmf) return true; } -static CompanyMask _dirty_company_finances{}; ///< Bitmask of compamy finances that should be marked dirty. +static CompanyMask _dirty_company_finances{}; ///< Bitmask of company finances that should be marked dirty. /** * Mark all finance windows owned by a company as needing a refresh. @@ -1512,7 +1512,7 @@ std::optional ParseCompanyManagerFaceCode(std::string_view s auto bits = consumer.TryReadIntegerBase(10, true); if (!bits.has_value() || consumer.AnyBytesLeft()) return std::nullopt; - /* Ensure style laberl is valid. */ + /* Ensure style label is valid. */ auto style = FindCompanyManagerFaceLabel(label); if (!style.has_value()) return std::nullopt; diff --git a/src/core/string_consumer.hpp b/src/core/string_consumer.hpp index 74d88ce586..1201602ae1 100644 --- a/src/core/string_consumer.hpp +++ b/src/core/string_consumer.hpp @@ -74,7 +74,7 @@ public: [[nodiscard]] size_type GetBytesLeft() const noexcept { return this->src.size() - this->position; } /** - * Check wheter any bytes were already read. + * Check whether any bytes were already read. */ [[nodiscard]] bool AnyBytesRead() const noexcept { return this->position > 0; } /** @@ -543,12 +543,12 @@ public: void Skip(size_type len); /** - * Find first occurence of 'str'. + * Find first occurrence of 'str'. * @return Offset from current reader position. 'npos' if no match found. */ [[nodiscard]] size_type Find(std::string_view str) const; /** - * Find first occurence of 8-bit char 'c'. + * Find first occurrence of 8-bit char 'c'. * @return Offset from current reader position. 'npos' if no match found. */ [[nodiscard]] size_type FindChar(char c) const @@ -556,18 +556,18 @@ public: return this->Find({&c, 1}); } /** - * Find first occurence of UTF-8 char 'c'. + * Find first occurrence of UTF-8 char 'c'. * @return Offset from current reader position. 'npos' if no match found. */ [[nodiscard]] size_type FindUtf8(char32_t c) const; /** - * Find first occurence of any 8-bit char in 'chars'. + * Find first occurrence of any 8-bit char in 'chars'. * @return Offset from current reader position. 'npos' if no match found. */ [[nodiscard]] size_type FindCharIn(std::string_view chars) const; /** - * Find first occurence of any 8-bit char not in 'chars'. + * Find first occurrence of any 8-bit char not in 'chars'. * @return Offset from current reader position. 'npos' if no match found. */ [[nodiscard]] size_type FindCharNotIn(std::string_view chars) const; diff --git a/src/currency.h b/src/currency.h index 08660e6cbf..a1f2a76268 100644 --- a/src/currency.h +++ b/src/currency.h @@ -44,7 +44,7 @@ enum Currencies : uint8_t { CURRENCY_NLG, ///< Dutch Gulden CURRENCY_NOK, ///< Norwegian Krone CURRENCY_PLN, ///< Polish Zloty - CURRENCY_RON, ///< Romenian Leu + CURRENCY_RON, ///< Romanian Leu CURRENCY_RUR, ///< Russian Rouble CURRENCY_SIT, ///< Slovenian Tolar CURRENCY_SEK, ///< Swedish Krona diff --git a/src/effectvehicle_func.h b/src/effectvehicle_func.h index a611bda3cd..abd4543c33 100644 --- a/src/effectvehicle_func.h +++ b/src/effectvehicle_func.h @@ -17,7 +17,7 @@ enum EffectVehicleType : uint8_t { EV_CHIMNEY_SMOKE = 0, ///< Smoke of power plant (industry). EV_STEAM_SMOKE = 1, ///< Smoke of steam engines. EV_DIESEL_SMOKE = 2, ///< Smoke of diesel engines. - EV_ELECTRIC_SPARK = 3, ///< Sparcs of electric engines. + EV_ELECTRIC_SPARK = 3, ///< Sparks of electric engines. EV_CRASH_SMOKE = 4, ///< Smoke of disasters. EV_EXPLOSION_LARGE = 5, ///< Various explosions. EV_BREAKDOWN_SMOKE = 6, ///< Smoke of broken vehicles except aircraft. diff --git a/src/engine.cpp b/src/engine.cpp index a63b5a1954..a89713162d 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -524,7 +524,7 @@ void EngineOverrideManager::ResetToDefaultMapping() * @param grf_local_id The local id in the newgrf * @param grfid The GrfID that defines the scope of grf_local_id. * If a newgrf overrides the engines of another newgrf, the "scope grfid" is the ID of the overridden newgrf. - * If dynnamic_engines is disabled, all newgrf share the same ID scope identified by INVALID_GRFID. + * If dynamic_engines is disabled, all newgrf share the same ID scope identified by INVALID_GRFID. * @return The engine ID if present, or EngineID::Invalid() if not. */ EngineID EngineOverrideManager::GetID(VehicleType type, uint16_t grf_local_id, uint32_t grfid) @@ -542,7 +542,7 @@ EngineID EngineOverrideManager::GetID(VehicleType type, uint16_t grf_local_id, u * @param grf_local_id The local id in the newgrf * @param grfid The GrfID that defines the scope of grf_local_id. * If a newgrf overrides the engines of another newgrf, the "scope grfid" is the ID of the overridden newgrf. - * If dynnamic_engines is disabled, all newgrf share the same ID scope identified by INVALID_GRFID. + * If dynamic_engines is disabled, all newgrf share the same ID scope identified by INVALID_GRFID. * @param static_access Whether to actually reserve the EngineID. * @return The engine ID if present and now reserved, or EngineID::Invalid() if not. */ diff --git a/src/engine_base.h b/src/engine_base.h index edeb45d2ff..82ea41cd8f 100644 --- a/src/engine_base.h +++ b/src/engine_base.h @@ -212,7 +212,7 @@ struct EngineIDMappingKeyProjection { /** * Stores the mapping of EngineID to the internal id of newgrfs. - * Note: This is not part of Engine, as the data in the EngineOverrideManager and the engine pool get resetted in different cases. + * Note: This is not part of Engine, as the data in the EngineOverrideManager and the engine pool get reset in different cases. */ struct EngineOverrideManager { std::array, VEH_COMPANY_END> mappings; diff --git a/src/genworld.cpp b/src/genworld.cpp index fe7a8b86d5..effa9e16e7 100644 --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -455,7 +455,7 @@ void LoadTownData() default: NOT_REACHED(); } - TownID town_id; // The TownID of the town in OpenTTD. Not imported, but set during the founding proceess and stored here for convenience. + TownID town_id; // The TownID of the town in OpenTTD. Not imported, but set during the founding process and stored here for convenience. /* Try founding on the target tile, and if that doesn't work, find the nearest suitable tile up to 16 tiles away. * The target might be on water, blocked somehow, or on a steep slope that can't be terraformed by the founding command. */ for (auto tile : SpiralTileSequence(target_tile, 16, 0, 0)) { diff --git a/src/gfx.cpp b/src/gfx.cpp index 3c0b60901b..e7ab98b22f 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -850,7 +850,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str, /** * Draw a multiline string, possibly over multiple lines, if the region is within the current display clipping area. * @note With clipping, it is not possible to determine how tall the rendered text will be, as it's not layouted. - * Regulard DrawStringMultiLine must be used if the height needs to be known. + * Regular DrawStringMultiLine must be used if the height needs to be known. * * @param left The left most position to draw on. * @param right The right most position to draw on. diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 0240b28ba7..962b201405 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -1602,7 +1602,7 @@ struct PerformanceRatingDetailWindow : Window { /* Draw it */ DrawString(this->bar_left, this->bar_right, text_top, GetString(STR_PERFORMANCE_DETAIL_PERCENT, Clamp(val, 0, needed) * 100 / needed), TC_FROMSTRING, SA_HOR_CENTER); - /* SCORE_LOAN is inversed */ + /* SCORE_LOAN is inverted */ if (score_type == SCORE_LOAN) val = needed - val; /* Draw the amount we have against what is needed diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index 84527d9b9f..b0e4ce4ee5 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -96,7 +96,7 @@ uint16_t GroupStatistics::GetNumEngines(EngineID engine) const } /** - * Returns the GroupStatistic for the ALL_GROUPO of a vehicle type. + * Returns the GroupStatistic for the ALL_GROUP of a vehicle type. * @param v Vehicle. * @return GroupStatistics for the ALL_GROUP of the vehicle type. */ diff --git a/src/highscore.h b/src/highscore.h index d3a779dfbc..72af8add1e 100644 --- a/src/highscore.h +++ b/src/highscore.h @@ -15,7 +15,7 @@ #include "settings_type.h" struct HighScore { - std::string name; ///< The name of the companyy and president. + std::string name; ///< The name of the company and president. StringID title = INVALID_STRING_ID; ///< NOSAVE, has troubles with changing string-numbers. uint16_t score = 0; ///< The score for this high score. Do NOT change type, will break hs.dat }; diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index e0a5693610..d1e273ab4b 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -701,7 +701,7 @@ static void AnimateTile_Industry(TileIndex tile) if ((TimerGameTick::counter & 1) == 0) AnimateSugarSieve(tile); break; - case GFX_TOFFEE_QUARY: + case GFX_TOFFEE_QUARRY: if ((TimerGameTick::counter & 3) == 0) AnimateToffeeQuarry(tile); break; @@ -793,7 +793,7 @@ static void MakeIndustryTileBigger(TileIndex tile) case GFX_TOY_FACTORY: case GFX_BUBBLE_CATCHER: - case GFX_TOFFEE_QUARY: + case GFX_TOFFEE_QUARRY: SetAnimationFrame(tile, 0); SetIndustryAnimationLoop(tile, 0); break; @@ -938,7 +938,7 @@ static void TileLoop_Industry(TileIndex tile) TileLoopIndustry_BubbleGenerator(tile); break; - case GFX_TOFFEE_QUARY: + case GFX_TOFFEE_QUARRY: AddAnimatedTile(tile); break; diff --git a/src/industry_map.h b/src/industry_map.h index 700d33f4da..92957fa9f2 100644 --- a/src/industry_map.h +++ b/src/industry_map.h @@ -49,7 +49,7 @@ enum IndustryGraphics : uint8_t { GFX_PLASTIC_FOUNTAIN_ANIMATED_8 = 155, GFX_BUBBLE_GENERATOR = 161, GFX_BUBBLE_CATCHER = 162, - GFX_TOFFEE_QUARY = 165, + GFX_TOFFEE_QUARRY = 165, GFX_SUGAR_MINE_SIEVE = 174, GFX_WATERTILE_SPECIALCHECK = 255, ///< not really a tile, but rather a very special check }; diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp index b2cbef1095..5287fb633b 100644 --- a/src/linkgraph/linkgraphjob.cpp +++ b/src/linkgraph/linkgraphjob.cpp @@ -28,7 +28,7 @@ INSTANTIATE_POOL_METHODS(LinkGraphJob) /** * Create a link graph job from a link graph. The link graph will be copied so - * that the calculations don't interfer with the normal operations on the + * that the calculations don't interfere with the normal operations on the * original. The job is immediately started. * @param orig Original LinkGraph to be copied. */ diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 841cd5b5b5..2b7a9b9d8f 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -201,7 +201,7 @@ enum GlobalHotKeys : int32_t { GHK_TOGGLE_TRANSPARENCY, GHK_TOGGLE_INVISIBILITY = GHK_TOGGLE_TRANSPARENCY + 9, GHK_TRANSPARENCY_TOOLBAR = GHK_TOGGLE_INVISIBILITY + 8, - GHK_TRANSPARANCY, + GHK_TRANSPARENCY, GHK_CHAT, GHK_CHAT_ALL, GHK_CHAT_COMPANY, @@ -382,7 +382,7 @@ struct MainWindow : Window ShowTransparencyToolbar(); break; - case GHK_TRANSPARANCY: + case GHK_TRANSPARENCY: ResetRestoreAllTransparency(); break; @@ -515,7 +515,7 @@ struct MainWindow : Window Hotkey('7' | WKC_CTRL | WKC_SHIFT, "invisibility_structures", GHK_TOGGLE_INVISIBILITY + 6), Hotkey('8' | WKC_CTRL | WKC_SHIFT, "invisibility_catenary", GHK_TOGGLE_INVISIBILITY + 7), Hotkey('X' | WKC_CTRL, "transparency_toolbar", GHK_TRANSPARENCY_TOOLBAR), - Hotkey('X', "toggle_transparency", GHK_TRANSPARANCY), + Hotkey('X', "toggle_transparency", GHK_TRANSPARENCY), Hotkey({WKC_RETURN, 'T'}, "chat", GHK_CHAT), Hotkey({WKC_SHIFT | WKC_RETURN, WKC_SHIFT | 'T'}, "chat_all", GHK_CHAT_ALL), Hotkey({WKC_CTRL | WKC_RETURN, WKC_CTRL | 'T'}, "chat_company", GHK_CHAT_COMPANY), diff --git a/src/music/midi.h b/src/music/midi.h index cda9192696..40caf9e126 100644 --- a/src/music/midi.h +++ b/src/music/midi.h @@ -10,7 +10,7 @@ #ifndef MUSIC_MIDI_H #define MUSIC_MIDI_H -/** Header of a Stanard MIDI File */ +/** Header of a Standard MIDI File */ struct SMFHeader { uint16_t format; uint16_t tracks; @@ -73,7 +73,7 @@ enum MidiController : uint8_t { MIDICT_GENERAL4 = 19, /* Offset from MSB to LSB of continuous controllers */ MIDICTOFS_HIGHRES = 32, - /* Stanard continuous controllers (LSB control) */ + /* Standard continuous controllers (LSB control) */ MIDICT_BANKSELECT_LO = MIDICTOFS_HIGHRES + MIDICT_BANKSELECT, MIDICT_MODWHEEL_LO = MIDICTOFS_HIGHRES + MIDICT_MODWHEEL, MIDICT_BREATH_LO = MIDICTOFS_HIGHRES + MIDICT_BREATH, diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index cb2337d698..06776db56d 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -262,7 +262,7 @@ SOCKET NetworkAddress::Resolve(int family, int socktype, int flags, SocketList * std::copy_n(reinterpret_cast(runp->ai_addr), runp->ai_addrlen, reinterpret_cast(&this->address)); #ifdef __EMSCRIPTEN__ /* Emscripten doesn't zero sin_zero, but as we compare addresses - * to see if they are the same address, we need them to be zero'd. + * to see if they are the same address, we need them to be zeroed. * Emscripten is, as far as we know, the only OS not doing this. * * https://github.com/emscripten-core/emscripten/issues/12998 diff --git a/src/network/core/http_winhttp.cpp b/src/network/core/http_winhttp.cpp index abc6849d9b..4555bd0a14 100644 --- a/src/network/core/http_winhttp.cpp +++ b/src/network/core/http_winhttp.cpp @@ -159,7 +159,7 @@ void NetworkHTTPRequest::WinHttpCallback(DWORD code, void *info, DWORD length) DWORD size = *(DWORD *)info; /* Next step: read the data in a temporary allocated buffer. - * The buffer will be free'd by OnReceiveData() in the next step. */ + * The buffer will be freed by OnReceiveData() in the next step. */ char *buffer = size == 0 ? nullptr : new char[size]; WinHttpReadData(this->request, buffer, size, 0); } break; @@ -278,7 +278,7 @@ bool NetworkHTTPRequest::Receive() /** * Destructor of the HTTP request. * - * Makes sure all handlers are closed, and all memory is free'd. + * Makes sure all handlers are closed, and all memory is freed. */ NetworkHTTPRequest::~NetworkHTTPRequest() { diff --git a/src/network/core/network_game_info.cpp b/src/network/core/network_game_info.cpp index ab6a25b1ff..fb7c2fed49 100644 --- a/src/network/core/network_game_info.cpp +++ b/src/network/core/network_game_info.cpp @@ -42,7 +42,7 @@ NetworkServerGameInfo _network_game_info; ///< Information about our game. /** * Get the network version string used by this build. - * The returned string is guaranteed to be at most NETWORK_REVISON_LENGTH bytes including '\0' terminator. + * The returned string is guaranteed to be at most NETWORK_REVISION_LENGTH bytes including '\0' terminator. */ std::string_view GetNetworkRevisionString() { diff --git a/src/network/network_admin.cpp b/src/network/network_admin.cpp index 82b7bd5383..5ede07f12b 100644 --- a/src/network/network_admin.cpp +++ b/src/network/network_admin.cpp @@ -109,7 +109,7 @@ ServerNetworkAdminSocketHandler::~ServerNetworkAdminSocketHandler() } /** - * Handle the acception of a connection. + * Handle the acceptance of a connection. * @param s The socket of the new connection. * @param address The address of the peer. */ diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 618a499211..6dccf9e5fe 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -1117,7 +1117,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_MOVE(Packet &p) ClientID client_id = (ClientID)p.Recv_uint32(); CompanyID company_id = (CompanyID)p.Recv_uint8(); - Debug(net, 9, "Client::Receive_SERVER_MOVE(): client_id={}, comapny_id={}", client_id, company_id); + Debug(net, 9, "Client::Receive_SERVER_MOVE(): client_id={}, company_id={}", client_id, company_id); if (client_id == 0) { /* definitely an invalid client id, debug message and do nothing. */ diff --git a/src/network/network_coordinator.cpp b/src/network/network_coordinator.cpp index 95eee80530..992f129a36 100644 --- a/src/network/network_coordinator.cpp +++ b/src/network/network_coordinator.cpp @@ -656,7 +656,7 @@ void ClientNetworkCoordinatorSocketHandler::CloseTurnHandler(std::string_view to turn_it->second->CloseSocket(); /* We don't remove turn_handler here, as we can be called from within that - * turn_handler instance, so our object cannot be free'd yet. Instead, we + * turn_handler instance, so our object cannot be freed yet. Instead, we * check later if the connection is closed, and free the object then. */ } diff --git a/src/network/network_crypto.cpp b/src/network/network_crypto.cpp index 3a7148c1c1..60dc66fa2b 100644 --- a/src/network/network_crypto.cpp +++ b/src/network/network_crypto.cpp @@ -92,7 +92,7 @@ bool X25519DerivedKeys::Exchange(const X25519PublicKey &peer_public_key, X25519K } /** - * Encryption handler implementation for monocypther encryption after a X25519 key exchange. + * Encryption handler implementation for monocypher encryption after a X25519 key exchange. */ class X25519EncryptionHandler : public NetworkEncryptionHandler { private: diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index d6c77dce1f..0aefc12bd9 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1428,7 +1428,7 @@ private: } /** - * Crete new company button is clicked. + * Create new company button is clicked. * @param w The instance of this window. * @param pt The point where this button was clicked. */ @@ -1621,7 +1621,7 @@ public: { this->RebuildList(); - /* Currently server information is not sync'd to clients, so we cannot show it on clients. */ + /* Currently server information is not synced to clients, so we cannot show it on clients. */ this->GetWidget(WID_CL_SERVER_SELECTOR)->SetDisplayedPlane(_network_server ? 0 : SZSP_HORIZONTAL); this->SetWidgetDisabledState(WID_CL_SERVER_NAME_EDIT, !_network_server); } @@ -2065,7 +2065,7 @@ struct NetworkJoinStatusWindow : Window { } [[fallthrough]]; - default: // Waiting is 15%, so the resting receivement of map is maximum 70% + default: // Waiting is 15%, so the remaining downloading of the map is maximum 70% progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total; break; } diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 6cb2919198..63ae6a7d59 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1444,7 +1444,7 @@ static void ActivateOldShore() } /** - * Replocate the old tram depot sprites to the new position, if no new ones were loaded. + * Relocate the old tram depot sprites to the new position, if no new ones were loaded. */ static void ActivateOldTramDepot() { diff --git a/src/newgrf/newgrf_act0_cargo.cpp b/src/newgrf/newgrf_act0_cargo.cpp index 6c8be8c7d1..1f467bbd43 100644 --- a/src/newgrf/newgrf_act0_cargo.cpp +++ b/src/newgrf/newgrf_act0_cargo.cpp @@ -142,7 +142,7 @@ static ChangeInfoResult CargoReserveInfo(uint first, uint last, int prop, ByteRe cs->callback_mask = static_cast(buf.ReadByte()); break; - case 0x1D: // Vehicle capacity muliplier + case 0x1D: // Vehicle capacity multiplier cs->multiplier = std::max(1u, buf.ReadWord()); break; diff --git a/src/newgrf/newgrf_act0_globalvar.cpp b/src/newgrf/newgrf_act0_globalvar.cpp index 087d055f19..b71fccfb9b 100644 --- a/src/newgrf/newgrf_act0_globalvar.cpp +++ b/src/newgrf/newgrf_act0_globalvar.cpp @@ -472,7 +472,7 @@ bool GetGlobalVariable(uint8_t param, uint32_t *value, const GRFFile *grffile) /* skip elrail multiplier - disabled */ SB(*value, 8, 8, GetRailTypeInfo(RAILTYPE_MONO)->cost_multiplier); // monorail } else { - SB(*value, 8, 8, GetRailTypeInfo(RAILTYPE_ELECTRIC)->cost_multiplier); // electified railway + SB(*value, 8, 8, GetRailTypeInfo(RAILTYPE_ELECTRIC)->cost_multiplier); // electrified railway /* Skip monorail multiplier - no space in result */ } SB(*value, 16, 8, GetRailTypeInfo(RAILTYPE_MAGLEV)->cost_multiplier); // maglev diff --git a/src/newgrf/newgrf_act0_industries.cpp b/src/newgrf/newgrf_act0_industries.cpp index b01668400f..a0f9449e66 100644 --- a/src/newgrf/newgrf_act0_industries.cpp +++ b/src/newgrf/newgrf_act0_industries.cpp @@ -418,7 +418,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint first, uint last, int prop, By IndustryTileLayoutTile &it = layout.emplace_back(); - it.ti.x = buf.ReadByte(); // Offsets from northermost tile + it.ti.x = buf.ReadByte(); // Offsets from northernmost tile ++bytes_read; if (it.ti.x == 0xFE && k == 0) { diff --git a/src/newgrf/newgrf_act7_9.cpp b/src/newgrf/newgrf_act7_9.cpp index 4d08d2e67e..42c929e105 100644 --- a/src/newgrf/newgrf_act7_9.cpp +++ b/src/newgrf/newgrf_act7_9.cpp @@ -44,7 +44,7 @@ void InitializePatchFlags() | (1U << 0x09) // trainrefit | (0U << 0x0B) // subsidiaries | ((_settings_game.order.gradual_loading ? 1U : 0U) << 0x0C) // gradualloading - | (1U << 0x12) // unifiedmaglevmode - set bit 0 mode. Not revelant to OTTD + | (1U << 0x12) // unifiedmaglevmode - set bit 0 mode. Not relevant to OTTD | (1U << 0x13) // unifiedmaglevmode - set bit 1 mode | (1U << 0x14) // bridgespeedlimits | (1U << 0x16) // eternalgame @@ -55,7 +55,7 @@ void InitializePatchFlags() | ((_settings_game.construction.train_signal_side == 1 ? 1U : 0U) << 0x1B) // signalsontrafficside | ((_settings_game.vehicle.disable_elrails ? 0U : 1U) << 0x1C); // electrifiedrailway - _ttdpatch_flags[2] = (1U << 0x01) // loadallgraphics - obsolote + _ttdpatch_flags[2] = (1U << 0x01) // loadallgraphics - obsolete | (1U << 0x03) // semaphores | (1U << 0x0A) // newobjects | (0U << 0x0B) // enhancedgui diff --git a/src/newgrf_act5.h b/src/newgrf_act5.h index e560d2beda..4290ba1455 100644 --- a/src/newgrf_act5.h +++ b/src/newgrf_act5.h @@ -15,7 +15,7 @@ /** The type of action 5 type. */ enum Action5BlockType : uint8_t { A5BLOCK_FIXED, ///< Only allow replacing a whole block of sprites. (TTDP compatible) - A5BLOCK_ALLOW_OFFSET, ///< Allow replacing any subset by specifiing an offset. + A5BLOCK_ALLOW_OFFSET, ///< Allow replacing any subset by specifying an offset. A5BLOCK_INVALID, ///< unknown/not-implemented type }; diff --git a/src/newgrf_badge_gui.cpp b/src/newgrf_badge_gui.cpp index 3a92d8e06a..dcf5460e36 100644 --- a/src/newgrf_badge_gui.cpp +++ b/src/newgrf_badge_gui.cpp @@ -363,7 +363,7 @@ DropDownList BuildBadgeClassConfigurationList(const GUIBadgeClasses &gui_classes * Toggle badge class visibility. * @param feature Feature being used. * @param class_badge Class badge. - * @param click Dropdown click reuslt. + * @param click Dropdown click result. */ static void BadgeClassToggleVisibility(GrfSpecFeature feature, Badge &class_badge, int click_result, BadgeFilterChoices &choices) { @@ -570,7 +570,7 @@ void ResetBadgeFilter(BadgeFilterChoices &choices, BadgeClassID badge_class_inde /** * Set badge filter choice for a class. - * @param choides Badge filter choides. + * @param choices Badge filter choices. * @param badge_index Badge to set. The badge class is inferred from the badge. * @note if the badge_index is invalid, the filter will be reset instead. */ diff --git a/src/newgrf_commons.h b/src/newgrf_commons.h index 0719d9948d..fb44120a60 100644 --- a/src/newgrf_commons.h +++ b/src/newgrf_commons.h @@ -6,7 +6,7 @@ */ /** - * @file newgrf_commons.h This file simplyfies and embeds a common mechanism of + * @file newgrf_commons.h This file simplifies and embeds a common mechanism of * loading/saving and mapping of grf entities. */ diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 0707783adc..8248a0bbf0 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -246,7 +246,7 @@ enum TTDPAircraftMovementActions : uint8_t { AMA_TTDP_PAD1_TO_TAKEOFF, AMA_TTDP_PAD2_TO_TAKEOFF, AMA_TTDP_PAD3_TO_TAKEOFF, - AMA_TTDP_HANGAR_TO_TAKOFF, + AMA_TTDP_HANGAR_TO_TAKEOFF, AMA_TTDP_LANDING_TO_HANGAR, AMA_TTDP_IN_FLIGHT, }; @@ -1243,7 +1243,7 @@ int GetEngineProperty(EngineID engine, PropertyID property, int orig_value, cons } /** - * Test for vehicle build probablity type. + * Test for vehicle build probability type. * @param v Vehicle whose build probability to test. * @param type Build probability type to test for. * @returns True or false depending on the probability result, or std::nullopt if the callback failed. diff --git a/src/order_gui.cpp b/src/order_gui.cpp index df7d64da70..8193b6b411 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1771,7 +1771,7 @@ void ShowOrdersWindow(const Vehicle *v) /* Using a different WindowDescs for _local_company causes problems. * Due to this we have to close order windows in ChangeWindowOwner/CloseCompanyWindows, * because we cannot change switch the WindowDescs and keeping the old WindowDesc results - * in crashed due to missing widges. + * in crashed due to missing widget. * TODO Rewrite the order GUI to not use different WindowDescs. */ if (v->owner != _local_company) { diff --git a/src/os/macosx/string_osx.cpp b/src/os/macosx/string_osx.cpp index 1c75c83c67..957b801a1e 100644 --- a/src/os/macosx/string_osx.cpp +++ b/src/os/macosx/string_osx.cpp @@ -170,8 +170,8 @@ static const CTRunDelegateCallbacks _sprite_font_callback = { CFAutoRelease base(CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, buff, length, kCFAllocatorNull)); CFAttributedStringReplaceString(str.get(), CFRangeMake(0, 0), base.get()); - const UniChar replacment_char = 0xFFFC; - CFAutoRelease replacment_str(CFStringCreateWithCharacters(kCFAllocatorDefault, &replacment_char, 1)); + const UniChar replacement_char = 0xFFFC; + CFAutoRelease replacement_str(CFStringCreateWithCharacters(kCFAllocatorDefault, &replacement_char, 1)); /* Apply font and colour ranges to our string. This is important to make sure * that we get proper glyph boundaries on style changes. */ @@ -199,7 +199,7 @@ static const CTRunDelegateCallbacks _sprite_font_callback = { if (buff[c] >= SCC_SPRITE_START && buff[c] <= SCC_SPRITE_END && font->fc->MapCharToGlyph(buff[c], false) == 0) { CFAutoRelease del(CTRunDelegateCreate(&_sprite_font_callback, (void *)(size_t)(buff[c] | (font->fc->GetSize() << 24)))); /* According to the official documentation, if a run delegate is used, the char should always be 0xFFFC. */ - CFAttributedStringReplaceString(str.get(), CFRangeMake(c, 1), replacment_str.get()); + CFAttributedStringReplaceString(str.get(), CFRangeMake(c, 1), replacement_str.get()); CFAttributedStringSetAttribute(str.get(), CFRangeMake(c, 1), kCTRunDelegateAttributeName, del.get()); } } @@ -253,7 +253,7 @@ CoreTextParagraphLayout::CoreTextVisualRun::CoreTextVisualRun(CTRunRef run, Font CTRunGetGlyphs(run, CFRangeMake(0, 0), gl.get()); for (size_t i = 0; i < this->glyphs.size(); i++) { if (buff[this->glyph_to_char[i]] >= SCC_SPRITE_START && buff[this->glyph_to_char[i]] <= SCC_SPRITE_END && (gl[i] == 0 || gl[i] == 3)) { - /* A glyph of 0 indidicates not found, while apparently 3 is what char 0xFFFC maps to. */ + /* A glyph of 0 indicates not found, while apparently 3 is what char 0xFFFC maps to. */ this->glyphs[i] = font->fc->MapCharToGlyph(buff[this->glyph_to_char[i]]); this->positions.emplace_back(pts[i].x, pts[i].x + advs[i].width - 1, (font->fc->GetHeight() - ScaleSpriteTrad(FontCache::GetDefaultFontHeight(font->fc->GetSize()))) / 2); // Align sprite font to centre } else { diff --git a/src/palette.cpp b/src/palette.cpp index b22ac326ea..11d8e57777 100644 --- a/src/palette.cpp +++ b/src/palette.cpp @@ -29,7 +29,7 @@ static std::recursive_mutex _palette_mutex; ///< To coordinate access to _cur_pa * PALETTE_BITS reduces the bits-per-channel of 32bpp graphics data to allow faster palette lookups from * a smaller lookup table. * - * 6 bpc is chosen as this results in a palette lookup table of 256KiB with adequate fidelty. + * 6 bpc is chosen as this results in a palette lookup table of 256KiB with adequate fidelity. * In contrast, a 5 bpc lookup table would be 32KiB, and 7 bpc would be 2MiB. * * Values in the table are filled as they are first encountered -- larger lookup table means more colour diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp index f43ec4204b..f886a90774 100644 --- a/src/pathfinder/yapf/yapf_road.cpp +++ b/src/pathfinder/yapf/yapf_road.cpp @@ -404,7 +404,7 @@ public: TileArea non_cached_area = v->IsBus() ? st->bus_station : st->truck_station; non_cached_area.Expand(YAPF_ROADVEH_PATH_CACHE_DESTINATION_LIMIT); - /* Find the first tile not contained by the non-cachable area, and remove from the cache. */ + /* Find the first tile not contained by the non-cacheable area, and remove from the cache. */ auto it = std::find_if(std::begin(path_cache), std::end(path_cache), [&non_cached_area](const auto &pc) { return !non_cached_area.Contains(pc.tile); }); path_cache.erase(std::begin(path_cache), it); } diff --git a/src/picker_gui.h b/src/picker_gui.h index 2651f72f08..74489c8494 100644 --- a/src/picker_gui.h +++ b/src/picker_gui.h @@ -178,7 +178,7 @@ public: static constexpr int PREVIEW_LEFT = 31; ///< Offset from left edge to draw preview. static constexpr int PREVIEW_BOTTOM = 31; ///< Offset from bottom edge to draw preview. - static constexpr int STEP_PREVIEW_HEIGHT = 16; ///< Step for decreasing or increase preivew button height. + static constexpr int STEP_PREVIEW_HEIGHT = 16; ///< Step for decreasing or increase preview button height. static constexpr int MAX_PREVIEW_HEIGHT = PREVIEW_HEIGHT * 3; ///< Maximum height of each preview button. static constexpr uint EDITBOX_MAX_SIZE = 16; ///< The maximum number of characters for the filter edit box. diff --git a/src/random_access_file_type.h b/src/random_access_file_type.h index 8ad5f10f93..9ce82ecf89 100644 --- a/src/random_access_file_type.h +++ b/src/random_access_file_type.h @@ -24,7 +24,7 @@ class RandomAccessFile { static constexpr int BUFFER_SIZE = 512; std::string filename; ///< Full name of the file; relative path to subdir plus the extension of the file. - std::string simplified_filename; ///< Simplified lowecase name of the file; only the name, no path or extension. + std::string simplified_filename; ///< Simplified lowercase name of the file; only the name, no path or extension. std::optional file_handle; ///< File handle of the open file. size_t pos; ///< Position in the file of the end of the read buffer. diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index b6384e1d65..f1aff80870 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -794,7 +794,7 @@ CommandCost CmdBuildRoad(DoCommandFlags flags, TileIndex tile, RoadBits pieces, case MP_TUNNELBRIDGE: { if (GetTunnelBridgeTransportType(tile) != TRANSPORT_ROAD) goto do_clear; - /* Only allow building the outern roadbit, so building long roads stops at existing bridges */ + /* Only allow building the outer roadbit, so building long roads stops at existing bridges */ if (MirrorRoadBits(DiagDirToRoadBits(GetTunnelBridgeDirection(tile))) != pieces) goto do_clear; if (HasTileRoadType(tile, rtt)) return CommandCost(STR_ERROR_ALREADY_BUILT); /* Don't allow adding roadtype to the bridge/tunnel when vehicles are already driving on it */ diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index bb19487592..2117b85159 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1712,7 +1712,7 @@ static void CheckIfRoadVehNeedsService(RoadVehicle *v) SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } -/** Calandar day handler */ +/** Calander day handler */ void RoadVehicle::OnNewCalendarDay() { if (!this->IsFrontEngine()) return; diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index da1386915f..b00de76b61 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -3035,7 +3035,7 @@ bool AfterLoadGame() /* Fix articulated road vehicles. * Some curves were shorter than other curves. * Now they have the same length, but that means that trailing articulated parts will - * take longer to go through the curve than the parts in front which already left the courve. + * take longer to go through the curve than the parts in front which already left the curve. * So, make articulated parts catch up. */ bool roadside = _settings_game.vehicle.road_side == 1; std::vector skip_frames; diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index ea059def0f..880947c914 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -932,7 +932,7 @@ static bool LoadOldCompanyEconomy(LoadgameState &ls, int) if (!LoadChunk(ls, &c->cur_economy, _company_economy_chunk)) return false; - /* Don't ask, but the number in TTD(Patch) are inversed to OpenTTD */ + /* Don't ask, but the number in TTD(Patch) are inverted to OpenTTD */ c->cur_economy.income = -c->cur_economy.income; c->cur_economy.expenses = -c->cur_economy.expenses; diff --git a/src/screenshot.cpp b/src/screenshot.cpp index a2779fa58a..224241ec52 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -285,7 +285,7 @@ static bool MakeLargeWorldScreenshot(ScreenshotType t, uint32_t width = 0, uint3 } /** - * Callback for generating a heightmap. Supports 8bpp grayscale only. + * Callback for generating a heightmap. Supports 8bpp greyscale only. * @param buffer Destination buffer. * @param y Line number of the first line to write. * @param n Number of lines to write. diff --git a/src/script/api/script_object.cpp b/src/script/api/script_object.cpp index 6b7ee4b4f3..cb7421c97e 100644 --- a/src/script/api/script_object.cpp +++ b/src/script/api/script_object.cpp @@ -354,7 +354,7 @@ ScriptObject::DisableDoCommandScope::DisableDoCommandScope() /* static */ SQInteger ScriptObject::Constructor(HSQUIRRELVM) { - throw Script_FatalError("This class is not instantiable"); + throw Script_FatalError("This class is not instantiatable"); } /* static */ SQInteger ScriptObject::_cloned(HSQUIRRELVM vm) diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp index d7f4aaae11..4db10680e3 100644 --- a/src/script/api/script_object.hpp +++ b/src/script/api/script_object.hpp @@ -55,7 +55,7 @@ private: }; /** - * Uper-parent object of all API classes. You should never use this class in + * Upper-parent object of all API classes. You should never use this class in * your script, as it doesn't publish any public functions. It is used * internally to have a common place to handle general things, like internal * command processing, and command-validation checks. @@ -143,7 +143,7 @@ public: static void InitializeRandomizers(); /** - * Used when trying to instanciate ScriptObject from squirrel. + * Used when trying to instantiate ScriptObject from squirrel. */ static SQInteger Constructor(HSQUIRRELVM); diff --git a/src/script/api/script_order.hpp b/src/script/api/script_order.hpp index 1ecddfc226..e373e1e562 100644 --- a/src/script/api/script_order.hpp +++ b/src/script/api/script_order.hpp @@ -93,7 +93,7 @@ public: OC_RELIABILITY = ::OCV_RELIABILITY, ///< Skip based on the reliability, value is percent (0..100). OC_MAX_RELIABILITY = ::OCV_MAX_RELIABILITY, ///< Skip based on the maximum reliability. Value in percent OC_MAX_SPEED = ::OCV_MAX_SPEED, ///< Skip based on the maximum speed, value is in OpenTTD's internal speed unit, see ScriptEngine::GetMaxSpeed. - OC_AGE = ::OCV_AGE, ///< Skip based on the age, value is in calender-years. @see \ref ScriptCalendarTime + OC_AGE = ::OCV_AGE, ///< Skip based on the age, value is in calendar-years. @see \ref ScriptCalendarTime OC_REQUIRES_SERVICE = ::OCV_REQUIRES_SERVICE, ///< Skip when the vehicle requires service, no value. OC_UNCONDITIONALLY = ::OCV_UNCONDITIONALLY, ///< Always skip, no compare function, no value. OC_REMAINING_LIFETIME = ::OCV_REMAINING_LIFETIME, ///< Skip based on the remaining lifetime in calendar-years. @see \ref ScriptCalendarTime diff --git a/src/script/api/script_story_page.hpp b/src/script/api/script_story_page.hpp index f5fb408464..8816d6cd94 100644 --- a/src/script/api/script_story_page.hpp +++ b/src/script/api/script_story_page.hpp @@ -282,7 +282,7 @@ public: /** * Opens the Story Book if not yet open and selects the given page. * @param story_page_id The story page to update. If it is a global page, clients of all - * companies are affecetd. Otherwise only the clients of the company which the page belongs + * companies are affected. Otherwise only the clients of the company which the page belongs * to are affected. * @return True if the action succeeded. * @pre ScriptCompanyMode::IsDeity(). diff --git a/src/script/api/script_subsidy.hpp b/src/script/api/script_subsidy.hpp index 6483f01d82..e24dfdda0a 100644 --- a/src/script/api/script_subsidy.hpp +++ b/src/script/api/script_subsidy.hpp @@ -50,7 +50,7 @@ public: /** * Create a new subsidy. - * @param cargo_type The type of cargo to cary for the subsidy. + * @param cargo_type The type of cargo to carry for the subsidy. * @param from_type The type of the subsidy on the 'from' side. * @param from_id The ID of the 'from' side. * @param to_type The type of the subsidy on the 'to' side. diff --git a/src/script/api/script_tile.hpp b/src/script/api/script_tile.hpp index 18f7831b58..aec9329b45 100644 --- a/src/script/api/script_tile.hpp +++ b/src/script/api/script_tile.hpp @@ -415,7 +415,7 @@ public: * Raise the given corners of the tile. The corners can be combined, * for example: SLOPE_N | SLOPE_W (= SLOPE_NW) will raise the west and the north corner. * @note The corners will be modified in the order west (first), south, east, north (last). - * Changing one corner might cause another corner to be changed too. So modifiing + * Changing one corner might cause another corner to be changed too. So modifying * multiple corners may result in changing some corners by multiple steps. * @param tile The tile to raise. * @param slope Corners to raise (SLOPE_xxx). @@ -432,7 +432,7 @@ public: * Lower the given corners of the tile. The corners can be combined, * for example: SLOPE_N | SLOPE_W (= SLOPE_NW) will lower the west and the north corner. * @note The corners will be modified in the order west (first), south, east, north (last). - * Changing one corner might cause another corner to be changed too. So modifiing + * Changing one corner might cause another corner to be changed too. So modifying * multiple corners may result in changing some corners by multiple steps. * @param tile The tile to lower. * @param slope Corners to lower (SLOPE_xxx). diff --git a/src/script/api/script_vehicle.hpp b/src/script/api/script_vehicle.hpp index e0324daf27..3994acbd79 100644 --- a/src/script/api/script_vehicle.hpp +++ b/src/script/api/script_vehicle.hpp @@ -370,7 +370,7 @@ public: * is owned by you. * @pre ScriptEngine::IsBuildable(engine_id). * @pre ScriptCargo::IsValidCargo(cargo). - * @return The capacity the vehicle will have when refited. + * @return The capacity the vehicle will have when refitted. */ static SQInteger GetBuildWithRefitCapacity(TileIndex depot, EngineID engine_id, CargoType cargo); @@ -431,7 +431,7 @@ public: * @pre ScriptCargo::IsValidCargo(cargo). * @pre You must own the vehicle. * @pre The vehicle must be stopped in the depot. - * @return The capacity the vehicle will have when refited. + * @return The capacity the vehicle will have when refitted. */ static SQInteger GetRefitCapacity(VehicleID vehicle_id, CargoType cargo); diff --git a/src/sound/xaudio2_s.cpp b/src/sound/xaudio2_s.cpp index 0d565fcfc2..eadd825e05 100644 --- a/src/sound/xaudio2_s.cpp +++ b/src/sound/xaudio2_s.cpp @@ -167,7 +167,7 @@ std::optional SoundDriver_XAudio2::Start(const StringList &par CoUninitialize(); Debug(driver, 0, "xaudio2_s: XAudio2Create failed ({:08x})", (uint)hr); - return "Failed to inititialise the XAudio2 engine"; + return "Failed to initialise the XAudio2 engine"; } /* Create a mastering voice */ diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 6853bec8d8..1f88fe385b 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -888,7 +888,7 @@ typedef std::set, CargoSorter> CargoDataSet; /** * A cargo data entry representing one possible row in the station view window's * top part. Cargo data entries form a tree where each entry can have several - * children. Parents keep track of the sums of their childrens' cargo counts. + * children. Parents keep track of the sums of their children's cargo counts. */ class CargoDataEntry { public: diff --git a/src/strings_internal.h b/src/strings_internal.h index e718793f9a..07a2ab2a9b 100644 --- a/src/strings_internal.h +++ b/src/strings_internal.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 strings_interal.h Types and functions related to the internal workings of formatting OpenTTD's strings. */ +/** @file strings_internal.h Types and functions related to the internal workings of formatting OpenTTD's strings. */ #ifndef STRINGS_INTERNAL_H #define STRINGS_INTERNAL_H diff --git a/src/subsidy_base.h b/src/subsidy_base.h index 5bf8a4afcd..3cc6589e67 100644 --- a/src/subsidy_base.h +++ b/src/subsidy_base.h @@ -56,6 +56,6 @@ static const uint SUBSIDY_PAX_MIN_POPULATION = 400; ///< Min. population of to static const uint SUBSIDY_CARGO_MIN_POPULATION = 900; ///< Min. population of destination town for cargo route static const uint SUBSIDY_MAX_PCT_TRANSPORTED = 42; ///< Subsidy will be created only for towns/industries with less % transported static const uint SUBSIDY_MAX_DISTANCE = 70; ///< Max. length of subsidised route (DistanceManhattan) -static const uint SUBSIDY_TOWN_CARGO_RADIUS = 6; ///< Extent of a tile area around town center when scanning for town cargo acceptance and production (6 ~= min catchmement + min station / 2) +static const uint SUBSIDY_TOWN_CARGO_RADIUS = 6; ///< Extent of a tile area around town center when scanning for town cargo acceptance and production (6 ~= min catchment + min station / 2) #endif /* SUBSIDY_BASE_H */ diff --git a/src/table/airport_defaults.h b/src/table/airport_defaults.h index f7b1fb7f7c..8aa338467d 100644 --- a/src/table/airport_defaults.h +++ b/src/table/airport_defaults.h @@ -114,7 +114,7 @@ static const std::initializer_list _tile_table_city = { { _tile_table_city_0, DIR_N }, }; -/** Tiles for Metropolitain Airport (large) - 2 runways */ +/** Tiles for Metropolitan Airport (large) - 2 runways */ static const std::initializer_list _tile_table_metropolitan_0 = { MK(0, 0, APT_BUILDING_1), MK(1, 0, APT_APRON_FENCE_NW), diff --git a/src/table/settings/locale_settings.ini b/src/table/settings/locale_settings.ini index 8a9aa23adc..c5c0a520bf 100644 --- a/src/table/settings/locale_settings.ini +++ b/src/table/settings/locale_settings.ini @@ -5,7 +5,7 @@ ; ; Locale settings as stored in the main configuration file ("openttd.cfg") and -; in the savegame PATS chunk. These settings are not sync'd over the network. +; in the savegame PATS chunk. These settings are not synced over the network. [pre-amble] static std::pair SettingsValueVelocityUnit(const IntSettingDesc &sd, int32_t value); diff --git a/src/table/sprites.h b/src/table/sprites.h index 21f9318be4..573bead42f 100644 --- a/src/table/sprites.h +++ b/src/table/sprites.h @@ -153,7 +153,7 @@ static const SpriteID SPR_GROUP_LIVERY_SHIP = SPR_OPENTTD_BASE + 177; static const SpriteID SPR_GROUP_LIVERY_AIRCRAFT = SPR_OPENTTD_BASE + 178; static const SpriteID SPR_TOWN_RATING_NA = SPR_OPENTTD_BASE + 162; -static const SpriteID SPR_TOWN_RATING_APALLING = SPR_OPENTTD_BASE + 163; +static const SpriteID SPR_TOWN_RATING_APPALLING = SPR_OPENTTD_BASE + 163; static const SpriteID SPR_TOWN_RATING_MEDIOCRE = SPR_OPENTTD_BASE + 164; static const SpriteID SPR_TOWN_RATING_GOOD = SPR_OPENTTD_BASE + 165; diff --git a/src/tests/test_script_admin.cpp b/src/tests/test_script_admin.cpp index b3121032ec..ce2ecd0ee7 100644 --- a/src/tests/test_script_admin.cpp +++ b/src/tests/test_script_admin.cpp @@ -52,7 +52,7 @@ extern bool ScriptAdminMakeJSON(nlohmann::json &json, HSQUIRRELVM vm, SQInteger static std::optional TestScriptAdminMakeJSON(std::string_view squirrel) { auto vm = sq_open(1024); - /* sq_compile creates a closure with our snipper, which is a table. + /* sq_compile creates a closure with our snippet, which is a table. * Add "return " to get the table on the stack. */ std::string buffer = fmt::format("return {}", squirrel); diff --git a/src/tilearea_type.h b/src/tilearea_type.h index 85a910a97b..56fb49721a 100644 --- a/src/tilearea_type.h +++ b/src/tilearea_type.h @@ -77,7 +77,7 @@ struct DiagonalTileArea { * Construct this tile area with some set values. * @param tile The base tile. * @param a The "x" extent. - * @param b The "y" estent. + * @param b The "y" extent. */ DiagonalTileArea(TileIndex tile = INVALID_TILE, int16_t a = 0, int16_t b = 0) : tile(tile), a(a), b(b) { diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 1efb3f5f42..8f71d93f1c 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -81,7 +81,7 @@ RailType _last_built_railtype; RoadType _last_built_roadtype; RoadType _last_built_tramtype; -/** Toobar modes */ +/** Toolbar modes */ enum ToolbarMode : uint8_t { TB_NORMAL, TB_UPPER, @@ -1117,7 +1117,7 @@ void ToggleDirtyBlocks() } /** - * Toggle drawing of widget outlihes. + * Toggle drawing of widget outlines. * @note has only an effect when newgrf_developer_tools are active. */ void ToggleWidgetOutlines() @@ -1426,8 +1426,8 @@ public: this->current_y = given_height; /* Figure out what are the visible buttons */ - uint arrangable_count, button_count, spacer_count; - const WidgetID *arrangement = GetButtonArrangement(given_width, arrangable_count, button_count, spacer_count); + uint arrangeable_count, button_count, spacer_count; + const WidgetID *arrangement = GetButtonArrangement(given_width, arrangeable_count, button_count, spacer_count); /* Create us ourselves a quick lookup table from WidgetID to slot. */ std::map lookup; @@ -1448,8 +1448,8 @@ public: uint button_i = 0; /* Index into the arrangement indices. */ - const WidgetID *slotp = rtl ? &arrangement[arrangable_count - 1] : arrangement; - for (uint i = 0; i < arrangable_count; i++) { + const WidgetID *slotp = rtl ? &arrangement[arrangeable_count - 1] : arrangement; + for (uint i = 0; i < arrangeable_count; i++) { uint slot = lookup[*slotp]; auto &child_wid = this->children[slot]; /* If we have space to give to the spacers, do that. */ @@ -1495,24 +1495,24 @@ public: /** * Get the arrangement of the buttons for the toolbar. * @param width the new width of the toolbar. - * @param arrangable_count output of the number of visible items. + * @param arrangeable_count output of the number of visible items. * @param button_count output of the number of visible buttons. * @param spacer_count output of the number of spacers. * @return the button configuration. */ - virtual const WidgetID *GetButtonArrangement(uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const = 0; + virtual const WidgetID *GetButtonArrangement(uint &width, uint &arrangeable_count, uint &button_count, uint &spacer_count) const = 0; }; /** Container for the 'normal' main toolbar */ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { - const WidgetID *GetButtonArrangement(uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const override + const WidgetID *GetButtonArrangement(uint &width, uint &arrangeable_count, uint &button_count, uint &spacer_count) const override { static const uint SMALLEST_ARRANGEMENT = 14; static const uint BIGGEST_ARRANGEMENT = 20; /* The number of buttons of each row of the toolbar should match the number of items which we want to be visible. - * The total number of buttons should be equal to arrangable_count * 2. - * No bad things happen, but we could see strange behaviours if we have buttons < (arrangable_count * 2) like a + * The total number of buttons should be equal to arrangeable_count * 2. + * No bad things happen, but we could see strange behaviours if we have buttons < (arrangeable_count * 2) like a * pause button appearing on the right of the lower toolbar and weird resizing of the widgets even if there is * enough space. */ @@ -1811,7 +1811,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { /* If at least BIGGEST_ARRANGEMENT fit, just spread all the buttons nicely */ uint full_buttons = std::max(CeilDiv(width, this->smallest_x), SMALLEST_ARRANGEMENT); if (full_buttons > BIGGEST_ARRANGEMENT) { - button_count = arrangable_count = lengthof(arrange_all); + button_count = arrangeable_count = lengthof(arrange_all); spacer_count = this->spacers; return arrange_all; } @@ -1819,7 +1819,7 @@ class NWidgetMainToolbarContainer : public NWidgetToolbarContainer { /* Introduce the split toolbar */ static const WidgetID * const arrangements[] = { arrange14, arrange15, arrange16, arrange17, arrange18, arrange19, arrange20 }; - button_count = arrangable_count = full_buttons; + button_count = arrangeable_count = full_buttons; spacer_count = this->spacers; return arrangements[full_buttons - SMALLEST_ARRANGEMENT] + ((_toolbar_mode == TB_LOWER) ? full_buttons : 0); } @@ -1845,7 +1845,7 @@ class NWidgetScenarioToolbarContainer : public NWidgetToolbarContainer { } } - const WidgetID *GetButtonArrangement(uint &width, uint &arrangable_count, uint &button_count, uint &spacer_count) const override + const WidgetID *GetButtonArrangement(uint &width, uint &arrangeable_count, uint &button_count, uint &spacer_count) const override { static const WidgetID arrange_all[] = { WID_TE_PAUSE, @@ -1918,8 +1918,8 @@ class NWidgetScenarioToolbarContainer : public NWidgetToolbarContainer { size_t min_full_width = (lengthof(arrange_all) - std::size(this->panel_widths)) * this->smallest_x + this->panel_widths[0] + this->panel_widths[1]; if (width >= min_full_width) { width -= this->panel_widths[0] + this->panel_widths[1]; - arrangable_count = lengthof(arrange_all); - button_count = arrangable_count - 2; + arrangeable_count = lengthof(arrange_all); + button_count = arrangeable_count - 2; spacer_count = this->spacers; return arrange_all; } @@ -1928,18 +1928,18 @@ class NWidgetScenarioToolbarContainer : public NWidgetToolbarContainer { size_t min_small_width = (lengthof(arrange_switch) - std::size(this->panel_widths)) * this->smallest_x / 2 + this->panel_widths[1]; if (width > min_small_width) { width -= this->panel_widths[1]; - arrangable_count = lengthof(arrange_nopanel); - button_count = arrangable_count - 1; + arrangeable_count = lengthof(arrange_nopanel); + button_count = arrangeable_count - 1; spacer_count = this->spacers - 1; return arrange_nopanel; } /* Split toolbar */ width -= this->panel_widths[1]; - arrangable_count = lengthof(arrange_switch) / 2; - button_count = arrangable_count - 1; + arrangeable_count = lengthof(arrange_switch) / 2; + button_count = arrangeable_count - 1; spacer_count = 0; - return arrange_switch + ((_toolbar_mode == TB_LOWER) ? arrangable_count : 0); + return arrange_switch + ((_toolbar_mode == TB_LOWER) ? arrangeable_count : 0); } }; diff --git a/src/town.h b/src/town.h index 11168ba287..a8786767c9 100644 --- a/src/town.h +++ b/src/town.h @@ -213,7 +213,7 @@ enum TownCouncilAttitudes { */ enum TownRatingCheckType { ROAD_REMOVE = 0, ///< Removal of a road owned by the town. - TUNNELBRIDGE_REMOVE = 1, ///< Removal of a tunnel or bridge owned by the towb. + TUNNELBRIDGE_REMOVE = 1, ///< Removal of a tunnel or bridge owned by the town. TOWN_RATING_CHECK_TYPE_COUNT, ///< Number of town checking action types. }; diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 0b0cdb8915..bcb03da78e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1427,7 +1427,7 @@ static bool GrowTownWithTunnel(const Town *t, const TileIndex tile, const DiagDi slope_tile += delta; } - /* More population means longer tunnels, but make sure we can at least cover the smallest mountain which neccesitates tunneling. */ + /* More population means longer tunnels, but make sure we can at least cover the smallest mountain which necessitates tunneling. */ max_tunnel_length = (t->cache.population / 1000) + 7; } else { /* When tunneling under an obstruction, the length limit is 5, enough to tunnel under a four-track railway. */ @@ -1435,7 +1435,7 @@ static bool GrowTownWithTunnel(const Town *t, const TileIndex tile, const DiagDi } uint8_t tunnel_length = 0; - TileIndex tunnel_tile = tile; // Iteratator to store the other end tile of the tunnel. + TileIndex tunnel_tile = tile; // Iterator to store the other end tile of the tunnel. /* Find the end tile of the tunnel for length and continuation checks. */ do { @@ -1636,7 +1636,7 @@ static TownGrowthResult GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, Dia if (cur_rb & target_rb) { /* If it's a road turn possibly build a house in a corner. * Use intersection with straight road as an indicator - * that we randomed corner house position. + * that we randomised corner house position. * A turn (and we check for that later) always has only * one common bit with a straight road so it has the same * chance to be chosen as the house on the side of a road. diff --git a/src/town_gui.cpp b/src/town_gui.cpp index b67e4c4882..8456176344 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -870,7 +870,7 @@ public: if (_game_mode == GM_EDITOR || !t->have_ratings.Test(_local_company)) { DrawSprite(SPR_TOWN_RATING_NA, PAL_NONE, icon_x, tr.top + (this->resize.step_height - icon_size.height) / 2); } else { - SpriteID icon = SPR_TOWN_RATING_APALLING; + SpriteID icon = SPR_TOWN_RATING_APPALLING; if (t->ratings[_local_company] > RATING_VERYPOOR) icon = SPR_TOWN_RATING_MEDIOCRE; if (t->ratings[_local_company] > RATING_GOOD) icon = SPR_TOWN_RATING_GOOD; DrawSprite(icon, PAL_NONE, icon_x, tr.top + (this->resize.step_height - icon_size.height) / 2); diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index d107d8434d..74328d6346 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -267,7 +267,7 @@ static Money TunnelBridgeClearCost(TileIndex tile, Price base_price) } break; case TRANSPORT_RAIL: base_cost += RailClearCost(GetRailType(tile)); break; - /* Aquaducts have their own clear price. */ + /* Aqueducts have their own clear price. */ case TRANSPORT_WATER: base_cost = _price[PR_CLEAR_AQUEDUCT]; break; default: break; } diff --git a/src/vehicle_base.h b/src/vehicle_base.h index b8cff16c46..8fe5ec0f6d 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -746,7 +746,7 @@ public: /** * Copy certain configurations and statistics of a vehicle after successful autoreplace/renew * The function shall copy everything that cannot be copied by a command (like orders / group etc), - * and that shall not be resetted for the new vehicle. + * and that shall not be reset for the new vehicle. * @param src The old vehicle */ inline void CopyVehicleConfigAndStatistics(Vehicle *src) @@ -1129,7 +1129,7 @@ struct SpecializedVehicle : public Vehicle { /** * Gets vehicle with given index - * @return pointer to vehicle with given index casted to T * + * @return pointer to vehicle with given index cast to T * */ static inline T *Get(auto index) { diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 75baae2051..93f665d4bd 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -357,7 +357,7 @@ struct RefitResult { * @param new_subtype Cargo subtype to refit to. 0xFF means to try keeping the same subtype according to GetBestFittingSubType(). * @param flags Command flags * @param auto_refit Refitting is done as automatic refitting outside a depot. - * @return Refit cost + refittet capacity + mail capacity (aircraft). + * @return Refit cost + refitted capacity + mail capacity (aircraft). */ static std::tuple RefitVehicle(Vehicle *v, bool only_this, uint8_t num_vehicles, CargoType new_cargo_type, uint8_t new_subtype, DoCommandFlags flags, bool auto_refit) { diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index d01733f12d..6960b0f925 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -141,7 +141,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 top Uppder y 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 bed619d1c3..734a34bb7a 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1065,7 +1065,7 @@ static void DrawTileHighlightType(const TileInfo *ti, TileHighlightType tht) } /** - * Highlights tiles insede local authority of selected towns. + * Highlights tiles inside local authority of selected towns. * @param *ti TileInfo Tile that is being drawn */ static void HighlightTownLocalAuthorityTiles(const TileInfo *ti) @@ -1104,7 +1104,7 @@ static void HighlightTownLocalAuthorityTiles(const TileInfo *ti) */ static void DrawTileSelection(const TileInfo *ti) { - /* Highlight tiles insede local authority of selected towns. */ + /* Highlight tiles inside local authority of selected towns. */ HighlightTownLocalAuthorityTiles(ti); /* Draw a red error square? */ @@ -1590,7 +1590,7 @@ static void ViewportSortParentSprites(ParentSpriteToSortVector *psdv) * adding extra fields to ParentSpriteToDraw structure. */ const uint32_t ORDER_COMPARED = UINT32_MAX; // Sprite was compared but we still need to compare the ones preceding it - const uint32_t ORDER_RETURNED = UINT32_MAX - 1; // Makr sorted sprite in case there are other occurrences of it in the stack + const uint32_t ORDER_RETURNED = UINT32_MAX - 1; // Mark sorted sprite in case there are other occurrences of it in the stack std::stack sprite_order; uint32_t next_order = 0; diff --git a/src/widget.cpp b/src/widget.cpp index 034c289ea4..138ce18264 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -1169,7 +1169,7 @@ void NWidgetCore::SetString(StringID string) /** * Set string and tool tip of the nested widget. - * @param stringThe new string. + * @param string The new string. * @param tool_tip The new tool_tip. */ void NWidgetCore::SetStringTip(StringID string, StringID tool_tip) @@ -3397,7 +3397,7 @@ std::unique_ptr MakeNWidgets(std::span nwid_part * between the title bar and the window body if the first widget in the parts array looks like a title bar (it is a horizontal * container with a caption widget) and has a shade box widget. * @param nwid_parts Span of nested widget parts. - * @param[out] shade_select Pointer to the inserted shade selection widget (\c nullptr if not unserted). + * @param[out] shade_select Pointer to the inserted shade selection widget (\c nullptr if not inserted). * @return Root of the nested widget tree, a vertical container containing the entire GUI. * @ingroup NestedWidgetParts */ diff --git a/src/widget_type.h b/src/widget_type.h index b7bb0ce925..063c6b4d6d 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -541,7 +541,7 @@ public: void AdjustPaddingForZoom() override; void SetPIP(uint8_t pip_pre, uint8_t pip_inter, uint8_t pip_post); - void SetPIPRatio(uint8_t pip_ratio_pre, uint8_t pip_ratio_inter, uint8_t pip_rato_post); + void SetPIPRatio(uint8_t pip_ratio_pre, uint8_t pip_ratio_inter, uint8_t pip_ratio_post); protected: NWidContainerFlags flags{}; ///< Flags of the container. diff --git a/src/window.cpp b/src/window.cpp index 4d11173c8a..ebda278665 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -706,7 +706,7 @@ static void DispatchLeftClickEvent(Window *w, int x, int y, int click_count) int dx = (w->resize.step_width == 0) ? 0 : def_width - w->width; int dy = (w->resize.step_height == 0) ? 0 : def_height - w->height; /* dx and dy has to go by step.. calculate it. - * The cast to int is necessary else dx/dy are implicitly casted to unsigned int, which won't work. */ + * The cast to int is necessary else dx/dy are implicitly cast to unsigned int, which won't work. */ if (w->resize.step_width > 1) dx -= dx % (int)w->resize.step_width; if (w->resize.step_height > 1) dy -= dy % (int)w->resize.step_height; ResizeWindow(w, dx, dy, false); @@ -996,7 +996,7 @@ void Window::ReInit(int rx, int ry, bool reposition) int dx = (this->resize.step_width == 0) ? 0 : window_width - this->width; int dy = (this->resize.step_height == 0) ? 0 : window_height - this->height; /* dx and dy has to go by step.. calculate it. - * The cast to int is necessary else dx/dy are implicitly casted to unsigned int, which won't work. */ + * The cast to int is necessary else dx/dy are implicitly cast to unsigned int, which won't work. */ if (this->resize.step_width > 1) dx -= dx % (int)this->resize.step_width; if (this->resize.step_height > 1) dy -= dy % (int)this->resize.step_height; @@ -1490,7 +1490,7 @@ void Window::FindWindowPlacementAndResize(int def_width, int def_height, bool al int enlarge_y = std::max(std::min(def_height - this->height, free_height - this->height), 0); /* X and Y has to go by step.. calculate it. - * The cast to int is necessary else x/y are implicitly casted to + * The cast to int is necessary else x/y are implicitly cast to * unsigned int, which won't work. */ if (this->resize.step_width > 1) enlarge_x -= enlarge_x % (int)this->resize.step_width; if (this->resize.step_height > 1) enlarge_y -= enlarge_y % (int)this->resize.step_height; @@ -2066,7 +2066,7 @@ static void EnsureVisibleCaption(Window *w, int nx, int ny) * Resize the window. * Update all the widgets of a window based on their resize flags * Both the areas of the old window and the new sized window are set dirty - * ensuring proper redrawal. + * ensuring proper redrawing. * @param w Window to resize * @param delta_x Delta x-size of changed window (positive if larger, etc.) * @param delta_y Delta y-size of changed window @@ -2266,7 +2266,7 @@ static EventState HandleWindowDragging() } /* X and Y has to go by step.. calculate it. - * The cast to int is necessary else x/y are implicitly casted to + * The cast to int is necessary else x/y are implicitly cast to * unsigned int, which won't work. */ if (w->resize.step_width > 1) x -= x % (int)w->resize.step_width; if (w->resize.step_height > 1) y -= y % (int)w->resize.step_height; @@ -2293,7 +2293,7 @@ static EventState HandleWindowDragging() _drag_delta.x += x; } - /* ResizeWindow sets both pre- and after-size to dirty for redrawal */ + /* ResizeWindow sets both pre- and after-size to dirty for redrawing */ ResizeWindow(w, x, y); return ES_HANDLED; } @@ -2377,7 +2377,7 @@ static void HandleScrollbarScrolling(Window *w) } /** - * Handle active widget (mouse draggin on widget) with the mouse. + * Handle active widget (mouse dragging on widget) with the mouse. * @return State of handling the event. */ static EventState HandleActiveWidget()