From fc832524c351f7274c58497b4496408bcbf62166 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Tue, 26 Aug 2025 23:00:26 +0200 Subject: [PATCH] Add 'const utf8*' to the args type union --- src/openrct2-ui/interface/Dropdown.h | 2 ++ src/openrct2-ui/windows/Dropdown.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/interface/Dropdown.h b/src/openrct2-ui/interface/Dropdown.h index 2899ca9683..e57723cfe7 100644 --- a/src/openrct2-ui/interface/Dropdown.h +++ b/src/openrct2-ui/interface/Dropdown.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -84,6 +85,7 @@ namespace OpenRCT2::Dropdown union { int64_t generic; + const utf8* string; ImageId image; } args{}; ItemFlags flags{}; diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index ef14c24cb4..c502774d3c 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -627,11 +627,11 @@ namespace OpenRCT2::Dropdown { Item MenuLabel(const utf8* string) { - return Item{ STR_OPTIONS_DROPDOWN_ITEM, reinterpret_cast(string) }; + return Item{ STR_OPTIONS_DROPDOWN_ITEM, { .string = string } }; } Item PlainMenuLabel(const utf8* string) { - return Item{ STR_STRING, reinterpret_cast(string) }; + return Item{ STR_STRING, { .string = string } }; } } // namespace OpenRCT2::Dropdown