From e93c20faf8b84621c94bf34150f951f2a43816e4 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 10 Feb 2021 15:36:22 +0100 Subject: [PATCH] Optimize ParserFileStream making unused temp copies of path opject --- .../Parsing/Impl/ParserFilesystemStream.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ZoneCodeGeneratorNew/Parsing/Impl/ParserFilesystemStream.cpp b/src/ZoneCodeGeneratorNew/Parsing/Impl/ParserFilesystemStream.cpp index c08bfc45..05f3395d 100644 --- a/src/ZoneCodeGeneratorNew/Parsing/Impl/ParserFilesystemStream.cpp +++ b/src/ZoneCodeGeneratorNew/Parsing/Impl/ParserFilesystemStream.cpp @@ -75,7 +75,8 @@ bool ParserFilesystemStream::IncludeFile(const std::string& filename) if (m_files.empty()) return false; - const auto newFilePath = fs::path(m_files.top().m_file_path).remove_filename().concat(filename); + auto newFilePath = fs::path(m_files.top().m_file_path); + newFilePath.remove_filename().concat(filename); FileInfo fileInfo(newFilePath.string());