From b5df12e20edefbdc34206bb1580257d782dc2a24 Mon Sep 17 00:00:00 2001 From: bugdea1er Date: Sun, 28 Jan 2024 19:39:49 +0300 Subject: [PATCH] Move the path parameter in tmp::path constructor --- include/tmp/path.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tmp/path.hpp b/include/tmp/path.hpp index 919b7db..0f4157f 100644 --- a/include/tmp/path.hpp +++ b/include/tmp/path.hpp @@ -52,7 +52,7 @@ class path { /// Creates a unique temporary path using the given constructor function. /// @param prefix the path between system temp /// @param creator wrapped mktemp-like function that returns resulting path - explicit path(std::filesystem::path path) : underlying(path) {} + explicit path(std::filesystem::path path) : underlying(std::move(path)) {} static std::filesystem::path make_parent(std::string_view prefix) { const auto parent = std::filesystem::temp_directory_path() / prefix;