mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-13 12:57:57 -05:00
string_util: Remove unnecessary std::string instance in TabsToSpaces()
We can just use the variant of std::string's replace() function that can replace an occurrence with N copies of the same character, eliminating the need to allocate a std::string containing a buffer of spaces.
This commit is contained in:
@ -57,7 +57,7 @@ static bool TryParse(const std::string& str, N* const output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string TabsToSpaces(int tab_size, const std::string& in);
|
||||
std::string TabsToSpaces(int tab_size, std::string in);
|
||||
|
||||
void SplitString(const std::string& str, char delim, std::vector<std::string>& output);
|
||||
|
||||
|
Reference in New Issue
Block a user