diff --git a/include/utils/string.hpp b/include/utils/string.hpp index 28de72c5..49409b95 100644 --- a/include/utils/string.hpp +++ b/include/utils/string.hpp @@ -56,7 +56,7 @@ namespace string_util { */ inline auto replace_all(const string& haystack, string needle, string replacement) { 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) { replaced += replacement; i += needle.length()-1;