Codechange: If modifying already written data in a StringBuilder, do this via the underlying std::string.

This commit is contained in:
frosch
2025-04-04 19:21:22 +02:00
committed by frosch
parent c5a43e705c
commit f306f9726c
2 changed files with 35 additions and 54 deletions

View File

@@ -274,23 +274,7 @@ public:
::Utf8Encode(iterator, c);
}
/**
* Get the current index in the string.
* @return The index.
*/
size_t CurrentIndex()
{
return this->string->size();
}
/**
* Get the reference to the character at the given index.
* @return The reference to the character.
*/
char &operator[](size_t index)
{
return (*this->string)[index];
}
std::string &GetString() { return *this->string; }
};
void GetStringWithArgs(StringBuilder &builder, StringID string, StringParameters &args, uint case_index = 0, bool game_script = false);