1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 02:12:37 +01:00

Codechange: Use enum class for NewsReferenceType.

This commit is contained in:
Peter Nelson
2025-02-02 18:26:24 +00:00
committed by Peter Nelson
parent ca75a8ce19
commit 9a6fc4eb76
9 changed files with 61 additions and 61 deletions

View File

@@ -38,11 +38,11 @@ public:
*/
enum NewsReferenceType {
/* Selection of useful game elements to refer to. */
NR_NONE = ::NR_NONE, ///< No reference supplied.
NR_TILE = ::NR_TILE, ///< Reference location, scroll to the location when clicking on the news.
NR_STATION = ::NR_STATION, ///< Reference station, scroll to the station when clicking on the news. Delete news when the station is deleted.
NR_INDUSTRY = ::NR_INDUSTRY, ///< Reference industry, scrolls to the industry when clicking on the news. Delete news when the industry is deleted.
NR_TOWN = ::NR_TOWN, ///< Reference town, scroll to the town when clicking on the news.
NR_NONE = to_underlying(::NewsReferenceType::None), ///< No reference supplied.
NR_TILE = to_underlying(::NewsReferenceType::Tile), ///< Reference location, scroll to the location when clicking on the news.
NR_STATION = to_underlying(::NewsReferenceType::Station), ///< Reference station, scroll to the station when clicking on the news. Delete news when the station is deleted.
NR_INDUSTRY = to_underlying(::NewsReferenceType::Industry), ///< Reference industry, scrolls to the industry when clicking on the news. Delete news when the industry is deleted.
NR_TOWN = to_underlying(::NewsReferenceType::Town), ///< Reference town, scroll to the town when clicking on the news.
};
/**