From 62f0e2aaf0ddf5199eee2332ccc912dea6490828 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 24 Oct 2022 00:51:47 +0200 Subject: [PATCH] Removed extraneous string copy constructor in CMDLCache::FindMDL Removed extraneous copy constructor, and added const qualifier to string 'svStudio'. --- r5dev/datacache/mdlcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r5dev/datacache/mdlcache.cpp b/r5dev/datacache/mdlcache.cpp index efbae0c7..b15cb7bb 100644 --- a/r5dev/datacache/mdlcache.cpp +++ b/r5dev/datacache/mdlcache.cpp @@ -38,7 +38,7 @@ studiohdr_t* CMDLCache::FindMDL(CMDLCache* cache, MDLHandle_t handle, void* a3) studiohdr_t* pStudioHDR = **reinterpret_cast(pStudioData); if (pStudioHDR) { - string svStudio = ConvertToUnixPath(string(pStudioHDR->name)); + const string svStudio = ConvertToUnixPath(pStudioHDR->name); if (svStudio.compare(ERROR_MODEL) == NULL) { g_pMDLFallback->m_pErrorHDR = pStudioHDR;