Skip to content

Commit

Permalink
Merge pull request #4355 from Sonicadvance1/move_instead_of_copy
Browse files Browse the repository at this point in the history
Fixes a couple locations where is variable is copied when it could be moved
  • Loading branch information
Sonicadvance1 authored Feb 13, 2025
2 parents 42b0fbd + 917cbba commit b76a296
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ SyscallHandler::GenerateMap(const std::string_view& GuestBinaryFile, const std::
return {};
}

const auto GuestSourceFile = fextl::fmt::format("{}/{}.src", FexSrcPath, GuestBinaryFileId);
auto GuestSourceFile = fextl::fmt::format("{}/{}.src", FexSrcPath, GuestBinaryFileId);

struct stat GuestSourceFileStat;

Expand Down 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 b76a296

Please sign in to comment.