# HG changeset patch # User alberth # Date 1280610176 0 # Node ID ca959eb5d431121cb57981e3a2017a579b2c4677 # Parent ea0089ca72efe157a9c492425421802f306c0521 (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. diff --git a/src/ai/api/ai_company.hpp b/src/ai/api/ai_company.hpp --- a/src/ai/api/ai_company.hpp +++ b/src/ai/api/ai_company.hpp @@ -93,7 +93,7 @@ * @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 --- a/src/ai/api/ai_error.hpp +++ b/src/ai/api/ai_error.hpp @@ -76,7 +76,7 @@ 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 --- a/src/ai/api/ai_group.hpp +++ b/src/ai/api/ai_group.hpp @@ -54,7 +54,7 @@ * 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 @@ * @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 @@ * @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 @@ * 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 @@ * @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 --- a/src/ai/api/ai_industrytype.hpp +++ b/src/ai/api/ai_industrytype.hpp @@ -114,7 +114,7 @@ * @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 @@ * 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 --- a/src/ai/api/ai_rail.hpp +++ b/src/ai/api/ai_rail.hpp @@ -194,7 +194,7 @@ * @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 --- a/src/ai/api/ai_tile.hpp +++ b/src/ai/api/ai_tile.hpp @@ -398,7 +398,7 @@ * @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 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -77,7 +77,7 @@ 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 @@ /** * 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 --- a/src/console_internal.h +++ b/src/console_internal.h @@ -21,7 +21,7 @@ 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 --- a/src/core/bitmath_func.hpp +++ b/src/core/bitmath_func.hpp @@ -178,7 +178,7 @@ 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 @@ #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 --- 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 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -698,7 +698,7 @@ * 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 @@ } } - /* 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 @@ /* 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 --- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -534,7 +534,7 @@ 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 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -114,7 +114,7 @@ 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 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -506,7 +506,7 @@ 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 @@ 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 --- a/src/highscore.cpp +++ b/src/highscore.cpp @@ -116,7 +116,7 @@ } } - /* 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 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -870,7 +870,7 @@ } } -/** 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 @@ 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 @@ 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 @@ }; -/** 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 --- 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 --- a/src/network/core/tcp_http.cpp +++ b/src/network/core/tcp_http.cpp @@ -90,8 +90,8 @@ * @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 --- 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 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -223,7 +223,7 @@ 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 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -406,7 +406,7 @@ * @param grfconfig GrfConfig to check * @return will return any of the following 3 values:
*