mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Add 'const utf8*' to the args type union
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <array>
|
||||
#include <openrct2-ui/UiStringIds.h>
|
||||
#include <openrct2/core/EnumUtils.hpp>
|
||||
#include <openrct2/core/StringTypes.h>
|
||||
#include <openrct2/interface/Window.h>
|
||||
#include <span>
|
||||
|
||||
@@ -84,6 +85,7 @@ namespace OpenRCT2::Dropdown
|
||||
union
|
||||
{
|
||||
int64_t generic;
|
||||
const utf8* string;
|
||||
ImageId image;
|
||||
} args{};
|
||||
ItemFlags flags{};
|
||||
|
||||
@@ -627,11 +627,11 @@ namespace OpenRCT2::Dropdown
|
||||
{
|
||||
Item MenuLabel(const utf8* string)
|
||||
{
|
||||
return Item{ STR_OPTIONS_DROPDOWN_ITEM, reinterpret_cast<int64_t>(string) };
|
||||
return Item{ STR_OPTIONS_DROPDOWN_ITEM, { .string = string } };
|
||||
}
|
||||
|
||||
Item PlainMenuLabel(const utf8* string)
|
||||
{
|
||||
return Item{ STR_STRING, reinterpret_cast<int64_t>(string) };
|
||||
return Item{ STR_STRING, { .string = string } };
|
||||
}
|
||||
} // namespace OpenRCT2::Dropdown
|
||||
|
||||
Reference in New Issue
Block a user