From cd46b267f5715c0900b409d7bcb97f6bc9a43d9e Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Sun, 22 Jul 2018 15:33:07 -0400
Subject: 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.
---
 src/common/string_util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/common/string_util.h')

diff --git a/src/common/string_util.h b/src/common/string_util.h
index daa071f83b..4a2143b592 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) {
         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);
 
-- 
cgit v1.2.3-70-g09d2