Codechange: use std::string as script API return type
This commit is contained in:
@@ -23,9 +23,9 @@ ScriptError::ScriptErrorMapString ScriptError::error_map_string = ScriptError::S
|
||||
return ScriptObject::GetLastError();
|
||||
}
|
||||
|
||||
/* static */ char *ScriptError::GetLastErrorString()
|
||||
/* static */ std::optional<std::string> ScriptError::GetLastErrorString()
|
||||
{
|
||||
return stredup((*error_map_string.find(ScriptError::GetLastError())).second);
|
||||
return (*error_map_string.find(ScriptError::GetLastError())).second;
|
||||
}
|
||||
|
||||
/* static */ ScriptErrorType ScriptError::StringToError(StringID internal_string_id)
|
||||
|
Reference in New Issue
Block a user