Fix #13760: Store encoded error message inside CommandCost. (#13764)

Encoded error message was previously static to avoid memmory allocation, however this causes complications.
This commit is contained in:
Peter Nelson
2025-03-15 20:09:11 +00:00
committed by GitHub
parent 0cd87bc8c1
commit a87b804386
5 changed files with 9 additions and 12 deletions

View File

@@ -50,7 +50,7 @@ typedef std::list<ErrorMessageData> ErrorList;
void ScheduleErrorMessage(ErrorList &datas);
void ScheduleErrorMessage(const ErrorMessageData &data);
void ShowErrorMessage(EncodedString &&summary_msg, int x, int y, const CommandCost &cc);
void ShowErrorMessage(EncodedString &&summary_msg, int x, int y, CommandCost &cc);
void ShowErrorMessage(EncodedString &&summary_msg, EncodedString &&detailed_msg, WarningLevel wl, int x = 0, int y = 0, EncodedString &&extra_msg = {}, CompanyID company = CompanyID::Invalid());
bool HideActiveErrorMessage();