Merge branch 'master' into jgrpp

Remove 'byte' typedef
This commit is contained in:
Jonathan G Rennison
2024-05-07 17:21:50 +01:00
376 changed files with 2220 additions and 2152 deletions

View File

@@ -20,7 +20,7 @@
/**
* Type of news.
*/
enum NewsType {
enum NewsType : uint8_t {
NT_ARRIVAL_COMPANY, ///< First vehicle arrived for company
NT_ARRIVAL_OTHER, ///< First vehicle arrived for competitor
NT_ACCIDENT, ///< An accident or disaster has occurred
@@ -49,7 +49,7 @@ enum NewsType {
* You have to make sure, #ChangeVehicleNews catches the DParams of your message.
* This is NOT ensured by the references.
*/
enum NewsReferenceType {
enum NewsReferenceType : uint8_t {
NR_NONE, ///< Empty reference
NR_TILE, ///< Reference tile. Scroll to tile when clicking on the news.
NR_VEHICLE, ///< Reference vehicle. Scroll to vehicle when clicking on the news. Delete news when vehicle is deleted.
@@ -99,7 +99,7 @@ enum NewsDisplay {
*/
struct NewsTypeData {
const char * const name; ///< Name
const byte age; ///< Maximum age of news items (in days)
const uint8_t age; ///< Maximum age of news items (in days)
const SoundFx sound; ///< Sound
/**
@@ -108,7 +108,7 @@ struct NewsTypeData {
* @param age The maximum age for these messages.
* @param sound The sound to play.
*/
NewsTypeData(const char *name, byte age, SoundFx sound) :
NewsTypeData(const char *name, uint8_t age, SoundFx sound) :
name(name),
age(age),
sound(sound)