diff --git a/src/openrct2/ride/CarEntry.h b/src/openrct2/ride/CarEntry.h index f91b4770d1..f3ea85a90d 100644 --- a/src/openrct2/ride/CarEntry.h +++ b/src/openrct2/ride/CarEntry.h @@ -153,7 +153,7 @@ enum class SpriteGroupType : uint8_t Count }; -static const std::string SpriteGroupNames[] = { +static constexpr const char* SpriteGroupNames[] = { "slopeFlat", "slopes12", "slopes25", "slopes42", "slopes60", "slopes75", "slopes90", "slopesLoop", "slopeInverted", "slopes8", "slopes16", "slopes50", diff --git a/src/openrct2/scripting/bindings/object/ScObject.hpp b/src/openrct2/scripting/bindings/object/ScObject.hpp index bd5a47b86a..d0754e9779 100644 --- a/src/openrct2/scripting/bindings/object/ScObject.hpp +++ b/src/openrct2/scripting/bindings/object/ScObject.hpp @@ -342,7 +342,7 @@ namespace OpenRCT2::Scripting { auto group = entry->SpriteGroups[g]; if (group.Enabled()) - groups.Set(SpriteGroupNames[g].c_str(), ToDuk(ctx, group)); + groups.Set(SpriteGroupNames[g], ToDuk(ctx, group)); } } return groups.Take();