1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Avoid constructing std::string_view from const char*

This commit is contained in:
ζeh Matt
2025-04-21 02:55:43 +03:00
parent 5eabdf8ec9
commit 8fdbf7ac0e

View File

@@ -2379,12 +2379,12 @@ void ConvertPeepAnimationTypeToObjects(OpenRCT2::GameState_t& gameState)
LOG_INFO("Converted %d peep entities", numConverted);
}
static constexpr std::array kClimateObjectIdsByLegacyClimateType = {
static constexpr auto kClimateObjectIdsByLegacyClimateType = std::to_array<std::string_view>({
"rct2.climate.cool_and_wet",
"rct2.climate.warm",
"rct2.climate.hot_and_dry",
"rct2.climate.cold",
};
});
std::string_view GetClimateObjectIdFromLegacyClimateType(OpenRCT2::RCT12::ClimateType climate)
{