From 2805854bb2ded93f0552edd6ec9dc9cad6a1fe3b Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 4 Nov 2022 15:09:18 -0700 Subject: [PATCH] fix int to size_t --- Utils/StringUtils.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Utils/StringUtils.h b/Utils/StringUtils.h index 76e7aa5..df70cec 100644 --- a/Utils/StringUtils.h +++ b/Utils/StringUtils.h @@ -24,10 +24,10 @@ namespace Utils { { const char* haystackT = haystack; - int i; - int match = 0; - int oldLength = strlen(needle); - int newLength = strlen(replace); + size_t i; + size_t match = 0; + size_t oldLength = strlen(needle); + size_t newLength = strlen(replace); for (i = 0; haystack[i] != '\0'; ++i) { if (strstr(&haystack[i], needle) == &haystack[i]) { @@ -42,7 +42,7 @@ namespace Utils { return NULL; } - int c = 0; + size_t c = 0; while (*haystack && c < i + match * (newLength - oldLength)) { if (strstr(haystack, needle) == haystack) { strcpy(&result[c], replace);