Codechange: remove const char* overloads when there are std::string_view and std::string& overloads

This commit is contained in:
Rubidium
2025-04-28 21:04:49 +02:00
committed by rubidium42
parent a5578166bb
commit 78250c3bba
13 changed files with 18 additions and 24 deletions

View File

@@ -370,10 +370,10 @@ static const PerformanceElement DISPLAY_ORDER_PFE[PFE_MAX] = {
PFE_SOUND,
};
static const char * GetAIName(int ai_index)
static std::string_view GetAIName(int ai_index)
{
if (!Company::IsValidAiID(ai_index)) return "";
return Company::Get(ai_index)->ai_info->GetName().c_str();
if (!Company::IsValidAiID(ai_index)) return {};
return Company::Get(ai_index)->ai_info->GetName();
}
/** @hideinitializer */