From 1543b909ddb796809210a17543d552b39817a114 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Tue, 28 Jan 2025 17:41:47 +0100 Subject: [PATCH] Codechange: use 'using' over 'typedef' --- src/script/api/script_types.hpp | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/script/api/script_types.hpp b/src/script/api/script_types.hpp index 972826f9cc..ee60c7c482 100644 --- a/src/script/api/script_types.hpp +++ b/src/script/api/script_types.hpp @@ -108,24 +108,24 @@ #ifdef DOXYGEN_API /* Define all types here, so they are added to the API docs. */ -typedef uint BridgeType; ///< The ID of a bridge type. -typedef uint8_t CargoType; ///< The ID of a cargo type. -typedef uint16_t EngineID; ///< The ID of an engine. -typedef uint16_t GoalID; ///< The ID of a goal. -typedef uint16_t GroupID; ///< The ID of a group. -typedef uint16_t IndustryID; ///< The ID of an industry. -typedef uint8_t IndustryType; ///< The ID of an industry-type. -typedef int64_t Money; ///< Money, stored in a 32bit/64bit safe way. For scripts money is always in pounds. -typedef uint16_t ObjectType; ///< The ID of an object-type. -typedef uint16_t SignID; ///< The ID of a sign. -typedef uint16_t StationID; ///< The ID of a station. -typedef uint32_t StringID; ///< The ID of a string. -typedef uint16_t SubsidyID; ///< The ID of a subsidy. -typedef uint16_t StoryPageID; ///< The ID of a story page. -typedef uint16_t StoryPageElementID; ///< The ID of a story page element. -typedef uint32_t TileIndex; ///< The ID of a map location. -typedef uint16_t TownID; ///< The ID of a town. -typedef uint32_t VehicleID; ///< The ID of a vehicle. +using BridgeType = uint32_t; ///< The ID of a bridge type. +using CargoType = uint8_t; ///< The ID of a cargo type. +using EngineID = uint16_t; ///< The ID of an engine. +using GoalID = uint16_t; ///< The ID of a goal. +using GroupID = uint16_t; ///< The ID of a group. +using IndustryID = uint16_t; ///< The ID of an industry. +using IndustryType = uint8_t; ///< The ID of an industry-type. +using Money = int64_t; ///< Money, stored in a 32bit/64bit safe way. For scripts money is always in pounds. +using ObjectType = uint16_t; ///< The ID of an object-type. +using SignID = uint16_t; ///< The ID of a sign. +using StationID = uint16_t; ///< The ID of a station. +using StringID = uint32_t; ///< The ID of a string. +using SubsidyID = uint16_t; ///< The ID of a subsidy. +using StoryPageID = uint16_t; ///< The ID of a story page. +using StoryPageElementID = uint16_t; ///< The ID of a story page element. +using TileIndex = uint32_t; ///< The ID of a map location. +using TownID = uint16_t; ///< The ID of a town. +using VehicleID = uint32_t; ///< The ID of a vehicle. #endif /* DOXYGEN_API */ /** @@ -133,6 +133,6 @@ typedef uint32_t VehicleID; ///< The ID of a vehicle. * * Possible value are defined inside each API class in an ErrorMessages enum. */ -typedef uint ScriptErrorType; +using ScriptErrorType = uint32_t; #endif /* SCRIPT_TYPES_HPP */