From e18d277d2705fc94180770911398019cd4f7b344 Mon Sep 17 00:00:00 2001 From: Ali Alamiri Date: Mon, 25 May 2020 11:57:46 +0100 Subject: [PATCH] Save copy by using emplace_back Co-authored-by: tt4g <45120617+tt4g@users.noreply.github.com> --- include/spdlog/details/os-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/spdlog/details/os-inl.h b/include/spdlog/details/os-inl.h index df199c3b..0fcfa10a 100644 --- a/include/spdlog/details/os-inl.h +++ b/include/spdlog/details/os-inl.h @@ -581,7 +581,7 @@ SPDLOG_INLINE std::vector get_directory_files(const filename_t &dire const filename_t full_file_name = directory + SPDLOG_FILENAME_T("/") + file_name; - files.push_back(full_file_name); + files.emplace_back(std::move(full_file_name)); } while (find_next_file(dir, &file_data)); FindClose(dir);