mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 17:00:52 +02:00
CPUBackend: std::move shared_ptr where applicable
Very minor, just avoids churning reference count increments and decrements.
This commit is contained in:
1 parent
76e6c6f8ea
commit
4e83ca67f5
1 file changed
+2
-2
@@ -317,7 +317,7 @@ namespace CPU {
|
||||
// Resize the code buffer and reallocate our code size
|
||||
CurrentCodeBuffer = CodeBuffers.StartLargerCodeBuffer();
|
||||
|
||||
RegisterForSignalHandler(PrevCodeBuffer);
|
||||
RegisterForSignalHandler(std::move(PrevCodeBuffer));
|
||||
return CurrentCodeBuffer.get();
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ namespace CPU {
|
||||
// We have signal handlers that have generated code
|
||||
// This means that we can not safely clear the code at this point in time
|
||||
// Keep a reference to the old code buffer to delay deallocation
|
||||
SignalHandlerCodeBuffers.push_back(CodeBuffer);
|
||||
SignalHandlerCodeBuffers.push_back(std::move(CodeBuffer));
|
||||
} else {
|
||||
SignalHandlerCodeBuffers.clear();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user