From d77dbdafb95911320f5b998200eac1659fdbe603 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 1 Jun 2023 00:08:22 +0200 Subject: [PATCH] Remove extraneous subtraction from array size constant The subtraction is not needed. --- r5dev/vpklib/packedstore.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/r5dev/vpklib/packedstore.cpp b/r5dev/vpklib/packedstore.cpp index 414190dd..97a1fcab 100644 --- a/r5dev/vpklib/packedstore.cpp +++ b/r5dev/vpklib/packedstore.cpp @@ -843,7 +843,7 @@ VPKDir_t::VPKDir_t(const CUtlString& dirFilePath, bool bSanitizeName) bool bHasLocale = false; - for (size_t i = 0; i < SDK_ARRAYSIZE(DIR_LOCALE) - 1; i++) + for (size_t i = 0; i < SDK_ARRAYSIZE(DIR_LOCALE); i++) { if (sanitizedName.Find(DIR_LOCALE[i]) != -1) { @@ -857,7 +857,7 @@ VPKDir_t::VPKDir_t(const CUtlString& dirFilePath, bool bSanitizeName) CUtlString packDirPrefix; packDirPrefix.Append(DIR_LOCALE[0]); - for (size_t i = 0; i < SDK_ARRAYSIZE(DIR_TARGET) - 1; i++) + for (size_t i = 0; i < SDK_ARRAYSIZE(DIR_TARGET); i++) { const char* targetName = DIR_TARGET[i]; @@ -941,7 +941,7 @@ CUtlString VPKDir_t::StripLocalePrefix(const CUtlString& directoryPath) const { CUtlString fileName = directoryPath.UnqualifiedFilename(); - for (size_t i = 0; i < SDK_ARRAYSIZE(DIR_LOCALE) - 1; i++) + for (size_t i = 0; i < SDK_ARRAYSIZE(DIR_LOCALE); i++) { fileName = fileName.Replace(DIR_LOCALE[i], ""); }