Codechange: remove const char* overloads when there are std::string_view and std::string& overloads
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user