From 21c49ee91dd5c2d7a941a056ba96693c8400d055 Mon Sep 17 00:00:00 2001 From: ohyzha Date: Tue, 18 Feb 2025 10:43:14 +0200 Subject: [PATCH] remove some redundant stuff --- openVulkanoCpp/IO/Archive/IArchiveWriter.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openVulkanoCpp/IO/Archive/IArchiveWriter.hpp b/openVulkanoCpp/IO/Archive/IArchiveWriter.hpp index 6c2820c..186537f 100644 --- a/openVulkanoCpp/IO/Archive/IArchiveWriter.hpp +++ b/openVulkanoCpp/IO/Archive/IArchiveWriter.hpp @@ -86,15 +86,13 @@ namespace OpenVulkano { AddFile(sDirName.c_str(), inArchiveDirName.c_str()); } - std::string fPath; for(const auto& entry : std::filesystem::directory_iterator(dirName)) { - fPath.clear(); - fPath = prefix + entry.path().filename().string(); + const std::string fPath = prefix + entry.path().filename().string(); if (entry.is_directory()) AddFiles(entry, fPath); else { - std::string entryName = entry.path().string(); + const std::string entryName = entry.path().string(); AddFile(entryName.c_str(), fPath.c_str()); } }