From a399e1e190c8b8b1549f05d168ae678aa829db3b Mon Sep 17 00:00:00 2001
From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com>
Date: Tue, 9 Aug 2022 10:56:57 +0200
Subject: [PATCH] Use 'std::string::compare' instead

---
 r5dev/datacache/mdlcache.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/r5dev/datacache/mdlcache.cpp b/r5dev/datacache/mdlcache.cpp
index e3d067f9..cc0ff804 100644
--- a/r5dev/datacache/mdlcache.cpp
+++ b/r5dev/datacache/mdlcache.cpp
@@ -39,12 +39,12 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* cache, MDLHandle_t handle, void* a3)
             if (pStudioHDR)
             {
                 string svStudio = ConvertToUnixPath(string(pStudioHDR->name));
-                if (strcmp(svStudio.c_str(), ERROR_MODEL) == 0)
+                if (svStudio.compare(ERROR_MODEL) == 0)
                 {
                     g_pMDLFallback->m_pErrorHDR = pStudioHDR;
                     g_pMDLFallback->m_hErrorMDL = handle;
                 }
-                if (strcmp(svStudio.c_str(), EMPTY_MODEL) == 0)
+                if (svStudio.compare(EMPTY_MODEL) == 0)
                 {
                     g_pMDLFallback->m_pEmptyHDR = pStudioHDR;
                     g_pMDLFallback->m_hEmptyMDL = handle;
@@ -356,7 +356,7 @@ bool CMDLCache::IsKnownBadModel(MDLHandle_t handle)
 void MDLCache_Attach()
 {
     DetourAttach((LPVOID*)&v_CMDLCache__FindMDL, &CMDLCache::FindMDL);
-#ifdef GAMEDLL_S3 // !!! DECLARED INLINE IN < S3 !!!
+#ifdef GAMEDLL_S3 // !!! DECLARED INLINE WITH FINDMDL IN < S3 !!!
     DetourAttach((LPVOID*)&v_CMDLCache__FindCachedMDL, &CMDLCache::FindCachedMDL);
     DetourAttach((LPVOID*)&v_CMDLCache__FindUncachedMDL, &CMDLCache::FindUncachedMDL);
 #endif // GAMEDLL_S3
@@ -369,7 +369,7 @@ void MDLCache_Attach()
 void MDLCache_Detach()
 {
     DetourDetach((LPVOID*)&v_CMDLCache__FindMDL, &CMDLCache::FindMDL);
-#ifdef GAMEDLL_S3 // !!! DECLARED INLINE IN < S3 !!!
+#ifdef GAMEDLL_S3 // !!! DECLARED INLINE WITH FINDMDL IN < S3 !!!
     DetourDetach((LPVOID*)&v_CMDLCache__FindCachedMDL, &CMDLCache::FindCachedMDL);
     DetourDetach((LPVOID*)&v_CMDLCache__FindUncachedMDL, &CMDLCache::FindUncachedMDL);
 #endif // GAMEDLL_S3