FEXRootFSFetcher: Move strings in GetDistroInfo()

Just a few instances where static analysis reports unnecessary copies.
This commit is contained in:
Lioncache committed 2025-03-27 13:36:00 -04:00
1 parent b8165813b4
commit 1ff2216063
1 file changed
+3 -3
+3 -3
View File
@@ -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;
}
}