From e1db09a41ff5b0198fe6ca838e81daf1ec982dc8 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sat, 26 Apr 2025 11:42:28 +0200 Subject: [PATCH] Codechange: use std::string_view for NewsTypeData --- src/news_type.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/news_type.h b/src/news_type.h index f8a9d525cb..87387a0f0b 100644 --- a/src/news_type.h +++ b/src/news_type.h @@ -106,7 +106,7 @@ enum class NewsDisplay : uint8_t { * Per-NewsType data */ 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 SoundFx sound; ///< Sound @@ -116,7 +116,7 @@ struct NewsTypeData { * @param age The maximum age for these messages. * @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), age(age), sound(sound)