mirror of https://github.com/OpenTTD/OpenTTD
Codechange: use std::string_view for NewsTypeData
parent
42f0aa24f6
commit
e1db09a41f
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue