Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -26,7 +26,7 @@ extern const SaveLoadVersion SAVEGAME_VERSION; ///< current savegame version
extern SavegameType _savegame_type; ///< type of savegame we are loading
extern uint32 _ttdp_version; ///< version of TTDP savegame (if applicable)
extern uint32_t _ttdp_version; ///< version of TTDP savegame (if applicable)
extern SaveLoadVersion _sl_version; ///< the major savegame version identifier
extern byte _sl_minor_version; ///< the minor savegame version, DO NOT USE!
@@ -155,7 +155,7 @@ struct GRFPresence{
GRFPresence(const GRFConfig *gc) : gc(gc), was_missing(false) {}
GRFPresence() = default;
};
typedef btree::btree_map<uint32, GRFPresence> GrfIDMapping;
typedef btree::btree_map<uint32_t, GRFPresence> GrfIDMapping;
/**
* Prints active gamelog
@@ -443,7 +443,7 @@ void GamelogOldver()
if (lc == nullptr) return;
lc->oldver.type = _savegame_type;
lc->oldver.version = (_savegame_type == SGT_OTTD ? ((uint32)_sl_version << 8 | _sl_minor_version) : _ttdp_version);
lc->oldver.version = (_savegame_type == SGT_OTTD ? ((uint32_t)_sl_version << 8 | _sl_minor_version) : _ttdp_version);
}
/**
@@ -452,7 +452,7 @@ void GamelogOldver()
* @param oldval old setting value
* @param newval new setting value
*/
void GamelogSetting(const char *name, int32 oldval, int32 newval)
void GamelogSetting(const char *name, int32_t oldval, int32_t newval)
{
assert(_gamelog_action_type == GLAT_SETTING);
@@ -510,7 +510,7 @@ void GamelogTestMode()
* @param bug type of bug, @see enum GRFBugs
* @param data additional data
*/
static void GamelogGRFBug(uint32 grfid, byte bug, uint64 data)
static void GamelogGRFBug(uint32_t grfid, byte bug, uint64_t data)
{
assert(_gamelog_action_type == GLAT_GRFBUG);
@@ -531,7 +531,7 @@ static void GamelogGRFBug(uint32 grfid, byte bug, uint64 data)
* @param internal_id the internal ID of whatever's broken in the NewGRF
* @return true iff a unique record was done
*/
bool GamelogGRFBugReverse(uint32 grfid, uint16 internal_id)
bool GamelogGRFBugReverse(uint32_t grfid, uint16_t internal_id)
{
for (LoggedAction &la : _gamelog_actions) {
for (LoggedChange &lc : la.changes) {
@@ -564,7 +564,7 @@ static inline bool IsLoggableGrfConfig(const GRFConfig *g)
* Logs removal of a GRF
* @param grfid ID of removed GRF
*/
void GamelogGRFRemove(uint32 grfid)
void GamelogGRFRemove(uint32_t grfid)
{
assert(_gamelog_action_type == GLAT_LOAD || _gamelog_action_type == GLAT_GRF);
@@ -610,7 +610,7 @@ void GamelogGRFCompatible(const GRFIdentifier *newg)
* @param grfid GRF that is moved
* @param offset how far it is moved, positive = moved down
*/
static void GamelogGRFMove(uint32 grfid, int32 offset)
static void GamelogGRFMove(uint32_t grfid, int32_t offset)
{
assert(_gamelog_action_type == GLAT_GRF);
@@ -626,7 +626,7 @@ static void GamelogGRFMove(uint32 grfid, int32 offset)
* Details about parameters changed are not stored
* @param grfid ID of GRF to store
*/
static void GamelogGRFParameters(uint32 grfid)
static void GamelogGRFParameters(uint32_t grfid)
{
assert(_gamelog_action_type == GLAT_GRF);
@@ -766,7 +766,7 @@ void GamelogGRFUpdate(const GRFConfig *oldc, const GRFConfig *newc)
* @param[out] ever_modified Max value of 'modified' from all binaries that ever saved this savegame.
* @param[out] removed_newgrfs Set to true if any NewGRFs have been removed.
*/
void GamelogInfo(const std::vector<LoggedAction> &gamelog_actions, uint32 *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs)
void GamelogInfo(const std::vector<LoggedAction> &gamelog_actions, uint32_t *last_ottd_rev, byte *ever_modified, bool *removed_newgrfs)
{
for (const LoggedAction &la : gamelog_actions) {
for (const LoggedChange &lc : la.changes) {