Core/Vmaps: Minor cleanup in vmap4assembler - use unique_ptr to manage file handles

This commit is contained in:
Shauren
2024-07-05 13:09:00 +02:00
parent 76a3611317
commit c8a55f4a18
5 changed files with 87 additions and 119 deletions

View File

@@ -49,16 +49,14 @@ int main(int argc, char* argv[])
std::cout << "using " << src << " as source directory and writing output to " << dest << std::endl;
VMAP::TileAssembler* ta = new VMAP::TileAssembler(src, dest);
VMAP::TileAssembler ta(std::move(src), std::move(dest));
if (!ta->convertWorld2())
if (!ta.convertWorld2())
{
std::cout << "exit with errors" << std::endl;
delete ta;
return 1;
}
delete ta;
std::cout << "Ok, all done" << std::endl;
return 0;
}