aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ConsoleSaveFileConverter.cpp
diff options
context:
space:
mode:
authorqwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com>2026-03-05 17:17:45 -0600
committerGitHub <noreply@github.com>2026-03-05 17:17:45 -0600
commit0666959d312dc74903f55d1071488a90239330f1 (patch)
tree5c6886f7ec65a7828bc6e34a469514e418bcf78b /Minecraft.World/ConsoleSaveFileConverter.cpp
parent9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff)
parenteed770b121aa4ce38f002db042d0137c24c6d344 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.World/ConsoleSaveFileConverter.cpp')
-rw-r--r--Minecraft.World/ConsoleSaveFileConverter.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/Minecraft.World/ConsoleSaveFileConverter.cpp b/Minecraft.World/ConsoleSaveFileConverter.cpp
index 16b025a5..21de3cbe 100644
--- a/Minecraft.World/ConsoleSaveFileConverter.cpp
+++ b/Minecraft.World/ConsoleSaveFileConverter.cpp
@@ -273,27 +273,29 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile *sourceSave, ConsoleS
// 4J Stu - Old version that just changes the compression of chunks, not usable for XboxOne style split saves or compressed tile formats
// Process region files
vector<FileEntry *> *allFilesInSave = sourceSave->getFilesWithPrefix(wstring(L""));
- for(AUTO_VAR(it, allFilesInSave->begin()); it < allFilesInSave->end(); ++it)
+ if ( allFilesInSave )
{
- FileEntry *fe = *it;
- if( fe != sourceLdatFe )
+ for ( FileEntry* fe : *allFilesInSave )
{
- wstring fName( fe->data.filename );
- wstring suffix(L".mcr");
- if( fName.compare(fName.length() - suffix.length(), suffix.length(), suffix) == 0 )
+ if (fe != sourceLdatFe)
{
+ wstring fName(fe->data.filename);
+ wstring suffix(L".mcr");
+ if (fName.compare(fName.length() - suffix.length(), suffix.length(), suffix) == 0)
+ {
#ifndef _CONTENT_PACKAGE
- wprintf(L"Processing a region file: %s\n", fe->data.filename);
+ wprintf(L"Processing a region file: %s\n", fe->data.filename);
#endif
- ProcessStandardRegionFile(sourceSave, File(fe->data.filename), targetSave, File(fe->data.filename) );
- }
- else
- {
+ ProcessStandardRegionFile(sourceSave, File(fe->data.filename), targetSave, File(fe->data.filename));
+ }
+ else
+ {
#ifndef _CONTENT_PACKAGE
- wprintf(L"%s is not a region file, ignoring\n", fe->data.filename);
+ wprintf(L"%s is not a region file, ignoring\n", fe->data.filename);
#endif
+ }
}
}
- }
#endif
+ }
} \ No newline at end of file