don't use std::move on const variables

This commit is contained in:
Shawn Hoffman 2020-08-17 17:23:28 -07:00
parent 1b1fc39f02
commit 3bc8a26083
3 changed files with 4 additions and 4 deletions

View File

@ -98,7 +98,7 @@ std::vector<std::string> DoFileSearch(const std::vector<std::string>& 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)

View File

@ -621,7 +621,7 @@ UIDSys::UIDSys(std::shared_ptr<HLE::FS::FileSystem> fs) : m_fs{fs}
{
while (true)
{
const std::pair<u32, u64> entry = ReadUidSysEntry(*file);
std::pair<u32, u64> entry = ReadUidSysEntry(*file);
if (!entry.first && !entry.second)
break;
@ -766,7 +766,7 @@ std::map<std::string, CertReader> ParseCertChain(const std::vector<u8>& 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;

View File

@ -45,7 +45,7 @@ public:
std::getline(buffer, section, '.');
std::getline(buffer, key, '=');
std::getline(buffer, value, '=');
const std::optional<Config::System> system = Config::GetSystemFromName(system_str);
std::optional<Config::System> system = Config::GetSystemFromName(system_str);
if (system)
{
m_values.emplace_back(