1
0
Fork 0

Codefix: Spelling error in name of GetGRFStringTextStackParameters

pull/14447/head
Jonathan G Rennison 2025-07-15 19:43:27 +01:00
parent 67e56391c7
commit aeb08a918a
3 changed files with 4 additions and 4 deletions

View File

@ -476,7 +476,7 @@ CommandCost GetErrorMessageFromLocationCallbackResult(uint16_t cb_res, std::span
/* If this error isn't for the local player then it won't be seen, so don't bother encoding anything. */
if (IsLocalCompany()) {
StringID stringid = GetGRFStringID(grffile->grfid, text_id);
auto params = GetGRFSringTextStackParameters(grffile, stringid, textstack);
auto params = GetGRFStringTextStackParameters(grffile, stringid, textstack);
res.SetEncodedMessage(GetEncodedStringWithArgs(stringid, params));
}

View File

@ -973,7 +973,7 @@ static void HandleNewGRFStringControlCodes(std::string_view str, TextRefStack &s
* @param textstack Text parameter stack.
* @returns Parameters for GRF string.
*/
std::vector<StringParameter> GetGRFSringTextStackParameters(const GRFFile *grffile, StringID stringid, std::span<const int32_t> textstack)
std::vector<StringParameter> GetGRFStringTextStackParameters(const GRFFile *grffile, StringID stringid, std::span<const int32_t> textstack)
{
if (stringid == INVALID_STRING_ID) return {};
@ -998,6 +998,6 @@ std::vector<StringParameter> GetGRFSringTextStackParameters(const GRFFile *grffi
std::string GetGRFStringWithTextStack(const struct GRFFile *grffile, GRFStringID grfstringid, std::span<const int32_t> textstack)
{
StringID stringid = GetGRFStringID(grffile->grfid, grfstringid);
auto params = GetGRFSringTextStackParameters(grffile, stringid, textstack);
auto params = GetGRFStringTextStackParameters(grffile, stringid, textstack);
return GetStringWithArgs(stringid, params);
}

View File

@ -28,7 +28,7 @@ void AddGRFTextToList(GRFTextWrapper &list, std::string_view text_to_add);
bool CheckGrfLangID(uint8_t lang_id, uint8_t grf_version);
std::vector<StringParameter> GetGRFSringTextStackParameters(const struct GRFFile *grffile, StringID stringid, std::span<const int32_t> textstack);
std::vector<StringParameter> GetGRFStringTextStackParameters(const struct GRFFile *grffile, StringID stringid, std::span<const int32_t> textstack);
std::string GetGRFStringWithTextStack(const struct GRFFile *grffile, GRFStringID grfstringid, std::span<const int32_t> textstack);
#endif /* NEWGRF_TEXT_H */