diff options
| author | 2018-07-22 15:33:07 -0400 | |
|---|---|---|
| committer | 2018-07-22 15:35:48 -0400 | |
| commit | cd46b267f5715c0900b409d7bcb97f6bc9a43d9e (patch) | |
| tree | 6c97e3a7e2727ebbbb84af10b16d1902ff0d283d /src/common/string_util.h | |
| parent | Merge pull request #773 from Subv/gl_ext_check (diff) | |
| download | yuzu-cd46b267f5715c0900b409d7bcb97f6bc9a43d9e.tar.gz yuzu-cd46b267f5715c0900b409d7bcb97f6bc9a43d9e.tar.xz yuzu-cd46b267f5715c0900b409d7bcb97f6bc9a43d9e.zip | |
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.
Diffstat (limited to 'src/common/string_util.h')
| -rw-r--r-- | src/common/string_util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h index daa071f83..4a2143b59 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -57,7 +57,7 @@ static bool TryParse(const std::string& str, N* const output) { | |||
| 57 | return false; | 57 | return false; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | std::string TabsToSpaces(int tab_size, const std::string& in); | 60 | std::string TabsToSpaces(int tab_size, std::string in); |
| 61 | 61 | ||
| 62 | void SplitString(const std::string& str, char delim, std::vector<std::string>& output); | 62 | void SplitString(const std::string& str, char delim, std::vector<std::string>& output); |
| 63 | 63 | ||