From 3bc8a26083549087c3bb285d5742a71160ae146b Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 17 Aug 2020 17:23:28 -0700 Subject: [PATCH] don't use std::move on const variables --- Source/Core/Common/FileSearch.cpp | 2 +- Source/Core/Core/IOS/ES/Formats.cpp | 4 ++-- Source/Core/UICommon/CommandLineParse.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Common/FileSearch.cpp b/Source/Core/Common/FileSearch.cpp index 6b28b93b4c..ff2de8eb3b 100644 --- a/Source/Core/Common/FileSearch.cpp +++ b/Source/Core/Common/FileSearch.cpp @@ -98,7 +98,7 @@ std::vector DoFileSearch(const std::vector& directorie }; for (const auto& directory : directories) { - const fs::path directory_path = StringToPath(directory); + fs::path directory_path = StringToPath(directory); if (fs::is_directory(directory_path)) // Can't create iterators for non-existant directories { if (recursive) diff --git a/Source/Core/Core/IOS/ES/Formats.cpp b/Source/Core/Core/IOS/ES/Formats.cpp index c1c815aef4..6e9a31f55c 100644 --- a/Source/Core/Core/IOS/ES/Formats.cpp +++ b/Source/Core/Core/IOS/ES/Formats.cpp @@ -621,7 +621,7 @@ UIDSys::UIDSys(std::shared_ptr fs) : m_fs{fs} { while (true) { - const std::pair entry = ReadUidSysEntry(*file); + std::pair entry = ReadUidSysEntry(*file); if (!entry.first && !entry.second) break; @@ -766,7 +766,7 @@ std::map ParseCertChain(const std::vector& chain) return certs; processed += cert_reader.GetBytes().size(); - const std::string name = cert_reader.GetName(); + std::string name = cert_reader.GetName(); certs.emplace(std::move(name), std::move(cert_reader)); } return certs; diff --git a/Source/Core/UICommon/CommandLineParse.cpp b/Source/Core/UICommon/CommandLineParse.cpp index c89a5784f0..6c06cb2ef2 100644 --- a/Source/Core/UICommon/CommandLineParse.cpp +++ b/Source/Core/UICommon/CommandLineParse.cpp @@ -45,7 +45,7 @@ public: std::getline(buffer, section, '.'); std::getline(buffer, key, '='); std::getline(buffer, value, '='); - const std::optional system = Config::GetSystemFromName(system_str); + std::optional system = Config::GetSystemFromName(system_str); if (system) { m_values.emplace_back(