Skip to content

Commit

Permalink
Fixes a couple locations where is variable is copied when it could be…
Browse files Browse the repository at this point in the history
… moved
  • Loading branch information
Sonicadvance1 committed Feb 13, 2025
1 parent 6651f9e commit 3948503
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Tools/CommonTools/Linux/Utils/ELFSymbolDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool ELFSymbolDatabase::FindLibraryFile(fextl::string* Result, const char* Libra
for (auto& Path : LibrarySearchPaths) {
const fextl::string TmpPath = fextl::fmt::format("{}/{}", Path, Library);
if (FHU::Filesystem::Exists(TmpPath)) {
*Result = TmpPath;
*Result = std::move(TmpPath);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ SyscallHandler::GenerateMap(const std::string_view& GuestBinaryFile, const std::

auto rv = fextl::make_unique<FEXCore::HLE::SourcecodeMap>();

rv->SourceFile = GuestSourceFile;
rv->SourceFile = std::move(GuestSourceFile);

auto EndSymbol = [&] {
if (LastSymbolOffset) {
Expand Down
2 changes: 1 addition & 1 deletion Source/Tools/pidof/pidof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int main(int argc, char** argv) {
PIDs.emplace_back(PIDInfo {
.pid = pid,
.cmdline = CMDLineData.str(),
.exe_link = exe_link,
.exe_link = std::move(exe_link),
.State = State,
});
}
Expand Down

0 comments on commit 3948503

Please sign in to comment.