fix(string_util): Type error

This commit is contained in:
Michael Carlberg 2016-10-19 10:10:28 +02:00
parent 3c0cc72c55
commit 3a5ee90bb5

View File

@ -56,7 +56,7 @@ namespace string_util {
*/ */
inline auto replace_all(const string& haystack, string needle, string replacement) { inline auto replace_all(const string& haystack, string needle, string replacement) {
string replaced; string replaced;
for (int i = 0; i < haystack.length(); i++) { for (size_t i = 0; i < haystack.length(); i++) {
if (haystack.compare(i, needle.length(), needle) == 0) { if (haystack.compare(i, needle.length(), needle) == 0) {
replaced += replacement; replaced += replacement;
i += needle.length()-1; i += needle.length()-1;