Codechange: Pass unformatted strings from GetStringPtr as std::string_view. (#13871)
This commit is contained in:
@@ -315,10 +315,10 @@ GameStrings *_current_data = nullptr;
|
||||
* @param id The ID of the game string.
|
||||
* @return The encoded string.
|
||||
*/
|
||||
const char *GetGameStringPtr(StringIndexInTab id)
|
||||
std::string_view GetGameStringPtr(StringIndexInTab id)
|
||||
{
|
||||
if (_current_data == nullptr || _current_data->cur_language == nullptr || id.base() >= _current_data->cur_language->lines.size()) return GetStringPtr(STR_UNDEFINED);
|
||||
return _current_data->cur_language->lines[id].c_str();
|
||||
return _current_data->cur_language->lines[id];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user