diff --git a/src/lib/util/corestr.c b/src/lib/util/corestr.c index 84feda50939..7e42e235065 100644 --- a/src/lib/util/corestr.c +++ b/src/lib/util/corestr.c @@ -300,7 +300,7 @@ std::string strmakelower(std::string& str) return str; } -int strreplace(std::string str, const std::string& search, const std::string& replace) +int strreplace(std::string &str, const std::string& search, const std::string& replace) { int searchlen = search.length(); int replacelen = replace.length(); diff --git a/src/lib/util/corestr.h b/src/lib/util/corestr.h index b875b25db02..519e1edc849 100644 --- a/src/lib/util/corestr.h +++ b/src/lib/util/corestr.h @@ -75,6 +75,6 @@ void strreplacechr(std::string& str, char ch, char newch); std::string strtrimspace(std::string& str); std::string strmakeupper(std::string& str); std::string strmakelower(std::string& str); -int strreplace(std::string str, const std::string& search, const std::string& replace); +int strreplace(std::string &str, const std::string& search, const std::string& replace); #endif /* __CORESTR_H__ */