1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +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

@@ -443,7 +443,7 @@ void ScriptEngine::LoadPlugins()
if (Path::DirectoryExists(base))
{
auto pattern = Path::Combine(base, "*.js");
auto scanner = std::unique_ptr<IFileScanner>(Path::ScanDirectory(pattern, true));
auto scanner = Path::ScanDirectory(pattern, true);
while (scanner->Next())
{
auto path = std::string(scanner->GetPath());