From 1ff2216063c4b69daf2de50a3488799fd7b93827 Mon Sep 17 00:00:00 2001 From: Lioncache Date: Thu, 27 Mar 2025 13:35:53 -0400 Subject: [PATCH] FEXRootFSFetcher: Move strings in GetDistroInfo() Just a few instances where static analysis reports unnecessary copies. --- Source/Tools/FEXRootFSFetcher/Main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Tools/FEXRootFSFetcher/Main.cpp b/Source/Tools/FEXRootFSFetcher/Main.cpp index b5308d00c..198c6c7ba 100644 --- a/Source/Tools/FEXRootFSFetcher/Main.cpp +++ b/Source/Tools/FEXRootFSFetcher/Main.cpp @@ -394,7 +394,7 @@ DistroInfo GetDistroInfo() { Info.DistroName = ToLower(Value); ++FoundCount; } else if (Key == "DISTRIB_RELEASE") { - Info.DistroVersion = Value; + Info.DistroVersion = std::move(Value); ++FoundCount; } } @@ -429,11 +429,11 @@ DistroInfo GetDistroInfo() { // Ubuntu provides VERSION_ID // Strip the two quotes from the VERSION_ID Value = Value.substr(1, Value.size() - 2); - Info.DistroVersion = Value; + Info.DistroVersion = std::move(Value); ++FoundCount; } else if (Key == "IMAGE_VERSION") { // Arch provides IMAGE_VERSION - Info.DistroVersion = Value; + Info.DistroVersion = std::move(Value); ++FoundCount; } }