fix(string_util): Type error

This commit is contained in:
Michael Carlberg 2016-10-19 10:10:28 +02:00
parent 3c0cc72c55
commit 3a5ee90bb5
1 changed files with 1 additions and 1 deletions

View File

@ -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;