diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-07-05 13:09:00 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-07-06 15:35:54 +0200 |
commit | 5ed6b5e53acfac7b371a0e2d9f17fb4831e38403 (patch) | |
tree | 599a6ac69092d553d7ca388a191e481e7cfdfb2f /src/tools/vmap4_assembler/VMapAssembler.cpp | |
parent | b62b0e9317b82a039170e008e6c368a96d3d329c (diff) |
Core/Vmaps: Minor cleanup in vmap4assembler - use unique_ptr to manage file handles
(cherry picked from commit c8a55f4a18052fa00e74a4fefdaf4a428252e1f9)
Diffstat (limited to 'src/tools/vmap4_assembler/VMapAssembler.cpp')
-rw-r--r-- | src/tools/vmap4_assembler/VMapAssembler.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/vmap4_assembler/VMapAssembler.cpp b/src/tools/vmap4_assembler/VMapAssembler.cpp index 38eb53ed9be..031a5c8dcb7 100644 --- a/src/tools/vmap4_assembler/VMapAssembler.cpp +++ b/src/tools/vmap4_assembler/VMapAssembler.cpp @@ -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; } |