From 41cb0052b21620f797a19b9d94035f8586f21193 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 25 Feb 2020 10:40:28 -0800 Subject: [PATCH] String fix --- BeefySysLib/util/String.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BeefySysLib/util/String.cpp b/BeefySysLib/util/String.cpp index 2d1552bc..3c0f2a23 100644 --- a/BeefySysLib/util/String.cpp +++ b/BeefySysLib/util/String.cpp @@ -108,7 +108,7 @@ intptr StringView::IndexOf(char c, int startIdx) const intptr StringView::IndexOf(char c, int64 startIdx) const { auto ptr = mPtr; - for (intptr i = startIdx; i < mLength; i++) + for (int64 i = startIdx; i < mLength; i++) if (ptr[i] == c) return i; return -1; @@ -812,7 +812,7 @@ intptr StringImpl::IndexOf(char c, int startIdx) const intptr StringImpl::IndexOf(char c, int64 startIdx) const { auto ptr = GetPtr(); - for (intptr i = startIdx; i < mLength; i++) + for (int64 i = startIdx; i < mLength; i++) if (ptr[i] == c) return i; return -1; @@ -827,7 +827,7 @@ intptr StringImpl::LastIndexOf(char c) const return -1; } -intptr StringImpl::LastIndexOf(char c, int64 startCheck) const +intptr StringImpl::LastIndexOf(char c, intptr startCheck) const { auto ptr = GetPtr(); for (intptr i = startCheck; i >= 0; i--)