diff --git a/include/vstd/StringUtils.h b/include/vstd/StringUtils.h index b6d3ac8e4..181f1f9a6 100644 --- a/include/vstd/StringUtils.h +++ b/include/vstd/StringUtils.h @@ -5,8 +5,8 @@ VCMI_LIB_NAMESPACE_BEGIN namespace vstd { - DLL_LINKAGE std::vector split(std::string s, std::string separators); - DLL_LINKAGE std::pair splitStringToPair(std::string input, char separator); + DLL_LINKAGE std::vector split(std::string s, const std::string& separators); + DLL_LINKAGE std::pair splitStringToPair(const std::string& input, char separator); } diff --git a/lib/vstd/StringUtils.cpp b/lib/vstd/StringUtils.cpp index 51499078c..3d86609f8 100644 --- a/lib/vstd/StringUtils.cpp +++ b/lib/vstd/StringUtils.cpp @@ -6,14 +6,14 @@ VCMI_LIB_NAMESPACE_BEGIN namespace vstd { - DLL_LINKAGE std::vector split(std::string s, std::string separators) + DLL_LINKAGE std::vector split(std::string s, const std::string& separators) { std::vector result; boost::split(result, s, boost::is_any_of(separators)); return result; } - DLL_LINKAGE std::pair splitStringToPair(std::string input, char separator) + DLL_LINKAGE std::pair splitStringToPair(const std::string& input, char separator) { std::pair ret; size_t splitPos = input.find(separator);