1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr

Also fixes a resource leak in TitleSequence::GetSaves.
This commit is contained in:
Silent
2021-05-20 17:06:53 +02:00
parent efd5d7dfe7
commit 94da3cf422
13 changed files with 17 additions and 19 deletions

View File

@@ -53,7 +53,7 @@ static std::vector<ReplayTestData> GetReplayFiles()
std::string replayPathPattern = Path::Combine(replayPath, "*.sv6r");
std::vector<std::string> files;
std::unique_ptr<IFileScanner> scanner = std::unique_ptr<IFileScanner>(Path::ScanDirectory(replayPathPattern, true));
auto scanner = Path::ScanDirectory(replayPathPattern, true);
while (scanner->Next())
{
ReplayTestData test;