Codechange: Pass more std::string to StringFilter::AddLine() (#10743)

This commit is contained in:
Tyler Trahan
2023-04-30 04:23:05 -04:00
committed by GitHub
parent ee9239d293
commit ba3de0383a
10 changed files with 28 additions and 24 deletions

View File

@@ -117,6 +117,19 @@ void StringFilter::AddLine(const char *str)
}
}
/**
* Pass another text line from the current item to the filter.
*
* You can call this multiple times for a single item, if the filter shall apply to multiple things.
* Before processing the next item you have to call ResetState().
*
* @param str Another line from the item.
*/
void StringFilter::AddLine(const std::string &str)
{
AddLine(str.c_str());
}
/**
* Pass another text line from the current item to the filter.
*
@@ -127,7 +140,5 @@ void StringFilter::AddLine(const char *str)
*/
void StringFilter::AddLine(StringID str)
{
char buffer[DRAW_STRING_BUFFER];
GetString(buffer, str, lastof(buffer));
AddLine(buffer);
AddLine(GetString(str));
}