1
0
Fork 0

Codechange: use std::string_view for NewsTypeData

pull/14115/head
Rubidium 2025-04-26 11:42:28 +02:00 committed by rubidium42
parent 42f0aa24f6
commit e1db09a41f
1 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ enum class NewsDisplay : uint8_t {
* Per-NewsType data * Per-NewsType data
*/ */
struct NewsTypeData { struct NewsTypeData {
const char * const name; ///< Name const std::string_view name; ///< Name
const uint8_t age; ///< Maximum age of news items (in days) const uint8_t age; ///< Maximum age of news items (in days)
const SoundFx sound; ///< Sound const SoundFx sound; ///< Sound
@ -116,7 +116,7 @@ struct NewsTypeData {
* @param age The maximum age for these messages. * @param age The maximum age for these messages.
* @param sound The sound to play. * @param sound The sound to play.
*/ */
NewsTypeData(const char *name, uint8_t age, SoundFx sound) : NewsTypeData(std::string_view name, uint8_t age, SoundFx sound) :
name(name), name(name),
age(age), age(age),
sound(sound) sound(sound)