diff --git a/src/ai/api/ai_company.hpp b/src/ai/api/ai_company.hpp index d8e958dfa7..8ce7923334 100644 --- a/src/ai/api/ai_company.hpp +++ b/src/ai/api/ai_company.hpp @@ -93,7 +93,7 @@ public: * @param gender The new gender for your president. * @pre GetPresidentGender(AICompany.COMPANY_SELF) != gender. * @return True if the gender was changed. - * @note When succesfull a random face will be created. + * @note When successful a random face will be created. */ static bool SetPresidentGender(Gender gender); diff --git a/src/ai/api/ai_error.hpp b/src/ai/api/ai_error.hpp index c810e57ac3..af76ffedac 100644 --- a/src/ai/api/ai_error.hpp +++ b/src/ai/api/ai_error.hpp @@ -76,7 +76,7 @@ public: enum ErrorMessages { /** Initial error value */ ERR_NONE = ERR_CAT_NONE << ERR_CAT_BIT_SIZE, // [] - /** If an error occured and the error wasn't mapped */ + /** If an error occurred and the error wasn't mapped */ ERR_UNKNOWN, // [] /** If a precondition is not met */ ERR_PRECONDITION_FAILED, // [] diff --git a/src/ai/api/ai_group.hpp b/src/ai/api/ai_group.hpp index fee341e3f1..06b51e4815 100644 --- a/src/ai/api/ai_group.hpp +++ b/src/ai/api/ai_group.hpp @@ -54,7 +54,7 @@ public: * given group will move to the GROUP_DEFAULT. * @param group_id The group to delete. * @pre IsValidGroup(group_id). - * @return True if and only if the group was succesfully deleted. + * @return True if and only if the group was successfully deleted. */ static bool DeleteGroup(GroupID group_id); @@ -92,7 +92,7 @@ public: * @param group_id The group to change the protection for. * @param enable True if protection should be enabled. * @pre IsValidGroup(group_id). - * @return True if and only if the protection was succesfully changed. + * @return True if and only if the protection was successfully changed. */ static bool EnableAutoReplaceProtection(GroupID group_id, bool enable); @@ -119,7 +119,7 @@ public: * @param vehicle_id The vehicle to move to the group. * @pre IsValidGroup(group_id) || group_id == GROUP_DEFAULT. * @pre AIVehicle::IsValidVehicle(vehicle_id). - * @return True if and only if the vehicle was succesfully moved to the group. + * @return True if and only if the vehicle was successfully moved to the group. * @note A vehicle can be in only one group at the same time. To remove it from * a group, move it to another or to GROUP_DEFAULT. Moving the vehicle to the * given group means removing it from another group. @@ -132,7 +132,7 @@ public: * If enabled, wagons are removed from the end of the vehicle until it * fits in the same number of tiles as it did before. * @param keep_length If true, wagons will be removed if the a new engine is longer. - * @return True if and only if the value was succesfully changed. + * @return True if and only if the value was successfully changed. */ static bool EnableWagonRemoval(bool keep_length); @@ -169,7 +169,7 @@ public: * @param group_id The group to stop replacing the engine in. * @param engine_id The engine id to stop replacing with another engine. * @pre IsValidGroup(group_id) || group_id == GROUP_DEFAULT || group_id == GROUP_ALL. - * @return True if and if the replacing was succesfully stopped. + * @return True if and if the replacing was successfully stopped. */ static bool StopAutoReplace(GroupID group_id, EngineID engine_id); }; diff --git a/src/ai/api/ai_industrytype.hpp b/src/ai/api/ai_industrytype.hpp index 8367483741..68705f6e89 100644 --- a/src/ai/api/ai_industrytype.hpp +++ b/src/ai/api/ai_industrytype.hpp @@ -114,7 +114,7 @@ public: * @param industry_type The type of the industry to build. * @param tile The tile to build the industry on. * @pre CanBuildIndustry(industry_type). - * @return True if the industry was succesfully build. + * @return True if the industry was successfully build. */ static bool BuildIndustry(IndustryType industry_type, TileIndex tile); @@ -123,7 +123,7 @@ public: * an industry on a random place on the map. * @param industry_type The type of the industry. * @pre CanProspectIndustry(industry_type). - * @return True if no error occured while trying to prospect. + * @return True if no error occurred while trying to prospect. * @note Even if true is returned there is no guarantee a new industry is build. * @note If true is returned the money is paid, whether a new industry was build or not. */ diff --git a/src/ai/api/ai_rail.hpp b/src/ai/api/ai_rail.hpp index 97bedcb216..4517aa4d05 100644 --- a/src/ai/api/ai_rail.hpp +++ b/src/ai/api/ai_rail.hpp @@ -194,7 +194,7 @@ public: * @pre AIMap::IsValidTile(end_tile). * @pre IsRailTypeAvailable(convert_to). * @exception AIRail::ERR_UNSUITABLE_TRACK - * @return Whether at least some rail has been converted succesfully. + * @return Whether at least some rail has been converted successfully. */ static bool ConvertRailType(TileIndex start_tile, TileIndex end_tile, AIRail::RailType convert_to); diff --git a/src/ai/api/ai_tile.hpp b/src/ai/api/ai_tile.hpp index be5f8ff7dc..1d34b4f024 100644 --- a/src/ai/api/ai_tile.hpp +++ b/src/ai/api/ai_tile.hpp @@ -398,7 +398,7 @@ public: * @exception AIError::ERR_TOO_CLOSE_TO_EDGE * @return True if one or more tiles were leveled. * @note Even if leveling some part fails, some other part may have been - * succesfully leveled already. + * successfully leveled already. * @note This function may return true in AITestMode, although it fails in * AIExecMode. */ diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 34def7f365..7605a563b0 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -77,7 +77,7 @@ void Company::PostDestructor(size_t index) InvalidateWindowData(WC_GRAPH_LEGEND, 0, (int)index); InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, (int)index); InvalidateWindowData(WC_COMPANY_LEAGUE, 0, 0); - /* If the currently shown error message has this company in it, the close it. */ + /* If the currently shown error message has this company in it, then close it. */ InvalidateWindowData(WC_ERRMSG, 0); } @@ -461,7 +461,7 @@ void ResetCompanyLivery(Company *c) /** * Create a new company and sets all company variables default values * - * @param is_ai is a ai company? + * @param is_ai is an AI company? * @param company CompanyID to use for the new company * @return the company struct */ diff --git a/src/console_internal.h b/src/console_internal.h index 8630ebf339..ae3daba37e 100644 --- a/src/console_internal.h +++ b/src/console_internal.h @@ -21,7 +21,7 @@ static const uint ICON_MAX_STREAMSIZE = 2048; ///< maximum length of a totally e enum ConsoleHookResult { CHR_ALLOW, ///< Allow command execution. CHR_DISALLOW, ///< Disallow command execution. - CHR_HIDE, ///< Hide the existance of the command. + CHR_HIDE, ///< Hide the existence of the command. }; /** --Commands-- diff --git a/src/core/bitmath_func.hpp b/src/core/bitmath_func.hpp index 14e9ed4e48..7a4a5da85b 100644 --- a/src/core/bitmath_func.hpp +++ b/src/core/bitmath_func.hpp @@ -178,7 +178,7 @@ static FORCEINLINE T ToggleBit(T &x, const uint8 y) extern const uint8 _ffb_64[64]; /** - * Returns the first occure of a bit in a 6-bit value (from right). + * Returns the first non-zero bit in a 6-bit value (from right). * * Returns the position of the first bit that is not zero, counted from the * LSB. Ie, 110100 returns 2, 000001 returns 0, etc. When x == 0 returns @@ -190,7 +190,7 @@ extern const uint8 _ffb_64[64]; #define FIND_FIRST_BIT(x) _ffb_64[(x)] /** - * Finds the position of the first bit in an integer. + * Finds the position of the first non-zero bit in an integer. * * This function returns the position of the first bit set in the * integer. It does only check the bits of the bitmask diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index b7d9846701..4c6c8bf041 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -22,8 +22,8 @@ * to care about that you grab an item which is * inside the list. * - * @param T The type of the items stored - * @param S The steps of allocation + * @tparam T The type of the items stored + * @tparam S The steps of allocation */ template class SmallVector { diff --git a/src/economy.cpp b/src/economy.cpp index 803a246aeb..6d35b35d35 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -698,7 +698,7 @@ static void CompaniesPayInterest() * but... as that number is likely not dividable by 12 (pay each month), * one needs to account for that in the monthly fee calculations. * To easily calculate what one should pay "this" month, you calculate - * what (total) should have been paid up to this month and you substract + * what (total) should have been paid up to this month and you subtract * whatever has been paid in the previous months. This will mean one month * it'll be a bit more and the other it'll be a bit less than the average * monthly fee, but on average it will be exact. */ @@ -1306,7 +1306,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) } } - /* Only set completly_emptied, if we just unloaded all remaining cargo */ + /* Only set completely_emptied, if we just unloaded all remaining cargo */ completely_emptied &= anything_unloaded; /* We update these variables here, so gradual loading still fills @@ -1340,7 +1340,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left) /* if the aircraft carries passengers and is NOT full, then * continue loading, no matter how much mail is in */ if ((v->type == VEH_AIRCRAFT && IsCargoInClass(v->cargo_type, CC_PASSENGERS) && v->cargo_cap > v->cargo.Count()) || - (cargo_not_full && (cargo_full & ~cargo_not_full) == 0)) { // There are stull non-full cargos + (cargo_not_full && (cargo_full & ~cargo_not_full) == 0)) { // There are still non-full cargos finished_loading = false; } } else if (cargo_not_full != 0) { diff --git a/src/fontcache.cpp b/src/fontcache.cpp index 80db06454b..32a4fd0728 100644 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -534,7 +534,7 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i ATSUSetAttributes(style, 1, &tag, &size, &val); offset += run_len; } - /* Exit if the end of the string is reached or some other error occured. */ + /* Exit if the end of the string is reached or some other error occurred. */ } while (os_err == kATSUFontsMatched && offset < (UniCharArrayOffset)str_len); if (os_err == noErr || os_err == kATSUFontsMatched) { diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 1bb99f38a0..42aca582f2 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -114,7 +114,7 @@ void CheckExternalFiles() const char *last = lastof(error_msg); if (used_set->GetNumInvalid() != 0) { - /* Not all files were loaded succesfully, see which ones */ + /* Not all files were loaded successfully, see which ones */ add_pos += seprintf(add_pos, last, "Trying to load graphics set '%s', but it is incomplete. The game will probably not run correctly until you properly install this set or select another one. See section 4.1 of readme.txt.\n\nThe following files are corrupted or missing:\n", used_set->name); for (uint i = 0; i < GraphicsSet::NUM_FILES; i++) { MD5File::ChecksumResult res = used_set->files[i].CheckMD5(DATA_DIR); diff --git a/src/group_gui.cpp b/src/group_gui.cpp index e7f76b896a..ccda6309d9 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -506,7 +506,7 @@ public: this->SetDirty(); break; - case GRP_WIDGET_LIST_GROUP: { // Maxtrix group + case GRP_WIDGET_LIST_GROUP: { // Matrix group const VehicleID vindex = this->vehicle_sel; this->vehicle_sel = INVALID_VEHICLE; this->SetDirty(); @@ -518,7 +518,7 @@ public: break; } - case GRP_WIDGET_LIST_VEHICLE: { // Maxtrix vehicle + case GRP_WIDGET_LIST_VEHICLE: { // Matrix vehicle const VehicleID vindex = this->vehicle_sel; this->vehicle_sel = INVALID_VEHICLE; this->SetDirty(); diff --git a/src/highscore.cpp b/src/highscore.cpp index 1c79d44fad..86460f97d4 100644 --- a/src/highscore.cpp +++ b/src/highscore.cpp @@ -116,7 +116,7 @@ int8 SaveHighScoreValueNetwork() } } - /* Add top5 companys to highscore table */ + /* Add top5 companies to highscore table */ return company; } diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index fd3bd2b5e2..51bc3001bd 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -870,7 +870,7 @@ static void UpdateIndustryProduction(Industry *i) } } -/** Widget definition of the view industy gui */ +/** Widget definition of the view industry gui */ static const NWidgetPart _nested_industry_view_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_CREAM), @@ -893,7 +893,7 @@ static const NWidgetPart _nested_industry_view_widgets[] = { EndContainer(), }; -/** Window definition of the view industy gui */ +/** Window definition of the view industry gui */ static const WindowDesc _industry_view_desc( WDP_AUTO, 260, 120, WC_INDUSTRY_VIEW, WC_NONE, @@ -914,7 +914,7 @@ enum IndustryDirectoryWidgets { IDW_SCROLLBAR, }; -/** Widget definition of the industy directory gui */ +/** Widget definition of the industry directory gui */ static const NWidgetPart _nested_industry_directory_widgets[] = { NWidget(NWID_HORIZONTAL), NWidget(WWT_CLOSEBOX, COLOUR_BROWN), @@ -1255,7 +1255,7 @@ const StringID IndustryDirectoryWindow::sorter_names[] = { }; -/** Window definition of the industy directory gui */ +/** Window definition of the industry directory gui */ static const WindowDesc _industry_directory_desc( WDP_AUTO, 428, 190, WC_INDUSTRY_DIRECTORY, WC_NONE, diff --git a/src/misc/binaryheap.hpp b/src/misc/binaryheap.hpp index 944032cac2..9096474e89 100644 --- a/src/misc/binaryheap.hpp +++ b/src/misc/binaryheap.hpp @@ -23,7 +23,7 @@ /** * Binary Heap as C++ template. - * A carrier which keeps its items automaticaly holds the smallest item at + * A carrier which keeps its items automatically holds the smallest item at * the first position. The order of items is maintained by using a binary tree. * The implementation is used for priority queue's. * @@ -36,7 +36,7 @@ * are allocated elsewhere. * * @par Implementation notes: - * Internaly the first item is never used, because that simplifies the + * Internally the first item is never used, because that simplifies the * implementation. * * @par diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp index a0303106b3..6de5cb8390 100644 --- a/src/network/core/tcp_http.cpp +++ b/src/network/core/tcp_http.cpp @@ -90,8 +90,8 @@ static const char * const LOCATION = "Location: "; ///< Header for l * @return amount of data to continue downloading. * > 0: we need to download N bytes. * = 0: we're being redirected. - * < 0: an error occured. Downloading failed. - * @note if an error occured the header might not be in its + * < 0: an error occurred. Downloading failed. + * @note if an error occurred the header might not be in its * original state. No effort is undertaken to bring * the header in its original state. */ diff --git a/src/network/core/tcp_http.h b/src/network/core/tcp_http.h index 13eeb7d544..2173ae2ea6 100644 --- a/src/network/core/tcp_http.h +++ b/src/network/core/tcp_http.h @@ -21,7 +21,7 @@ /** Callback for when the HTTP handler has something to tell us. */ struct HTTPCallback { /** - * An error has occured and the connection has been closed. + * An error has occurred and the connection has been closed. * @note HTTP socket handler is closed/freed. */ virtual void OnFailure() = 0; diff --git a/src/newgrf.cpp b/src/newgrf.cpp index bd4c913e2c..4abe302d2f 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -223,7 +223,7 @@ typedef std::map GRFLineToSpriteOverride; static GRFLineToSpriteOverride _grf_line_to_action6_sprite_override; /** DEBUG() function dedicated to newGRF debugging messages - * Function is essentialy the same as DEBUG(grf, severity, ...) with the + * Function is essentially the same as DEBUG(grf, severity, ...) with the * addition of file:line information when parsing grf files. * NOTE: for the above reason(s) grfmsg() should ONLY be used for * loading/parsing grf files, not for runtime debug messages as there diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index f993accb45..a925f86b0d 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -406,7 +406,7 @@ void ResetGRFConfig(bool defaults) * @param grfconfig GrfConfig to check * @return will return any of the following 3 values:
*