diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-05 17:17:45 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 17:17:45 -0600 |
| commit | 0666959d312dc74903f55d1071488a90239330f1 (patch) | |
| tree | 5c6886f7ec65a7828bc6e34a469514e418bcf78b /Minecraft.Client/Common/DLC/DLCPack.cpp | |
| parent | 9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff) | |
| parent | eed770b121aa4ce38f002db042d0137c24c6d344 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/Common/DLC/DLCPack.cpp')
| -rw-r--r-- | Minecraft.Client/Common/DLC/DLCPack.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Minecraft.Client/Common/DLC/DLCPack.cpp b/Minecraft.Client/Common/DLC/DLCPack.cpp index 4a003d05..ea8a270f 100644 --- a/Minecraft.Client/Common/DLC/DLCPack.cpp +++ b/Minecraft.Client/Common/DLC/DLCPack.cpp @@ -54,16 +54,18 @@ DLCPack::DLCPack(const wstring &name,const wstring &productID,DWORD dwLicenseMas DLCPack::~DLCPack() { - for(AUTO_VAR(it, m_childPacks.begin()); it != m_childPacks.end(); ++it) + for( auto& it : m_childPacks ) { - delete *it; + if ( it ) + delete it; } for(unsigned int i = 0; i < DLCManager::e_DLCType_Max; ++i) { - for(AUTO_VAR(it,m_files[i].begin()); it != m_files[i].end(); ++it) + for (auto& it : m_files[i] ) { - delete *it; + if ( it ) + delete it; } } @@ -161,7 +163,7 @@ void DLCPack::addParameter(DLCManager::EDLCParameterType type, const wstring &va bool DLCPack::getParameterAsUInt(DLCManager::EDLCParameterType type, unsigned int ¶m) { - AUTO_VAR(it,m_parameters.find((int)type)); + auto it = m_parameters.find((int)type); if(it != m_parameters.end()) { switch(type) @@ -270,7 +272,7 @@ bool DLCPack::doesPackContainFile(DLCManager::EDLCType type, const wstring &path else { g_pathCmpString = &path; - AUTO_VAR(it, find_if( m_files[type].begin(), m_files[type].end(), pathCmp )); + auto it = find_if(m_files[type].begin(), m_files[type].end(), pathCmp); hasFile = it != m_files[type].end(); if(!hasFile && m_parentPack ) { @@ -316,7 +318,7 @@ DLCFile *DLCPack::getFile(DLCManager::EDLCType type, const wstring &path) else { g_pathCmpString = &path; - AUTO_VAR(it, find_if( m_files[type].begin(), m_files[type].end(), pathCmp )); + auto it = find_if(m_files[type].begin(), m_files[type].end(), pathCmp); if(it == m_files[type].end()) { @@ -368,9 +370,9 @@ DWORD DLCPack::getFileIndexAt(DLCManager::EDLCType type, const wstring &path, bo DWORD foundIndex = 0; found = false; DWORD index = 0; - for(AUTO_VAR(it, m_files[type].begin()); it != m_files[type].end(); ++it) + for( auto& it : m_files[type] ) { - if(path.compare((*it)->getPath()) == 0) + if(path.compare(it->getPath()) == 0) { foundIndex = index; found = true; |
