mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Remove some calls to std::move.
Instead of moving out the data in a ErrorOr<std::unique_ptr<Foo>>, get a reference to it. Thanks to David Blaikie for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214516 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -39,11 +39,11 @@ LockFileManager::readLockFile(StringRef LockFileName) {
|
||||
sys::fs::remove(LockFileName);
|
||||
return None;
|
||||
}
|
||||
std::unique_ptr<MemoryBuffer> MB = std::move(MBOrErr.get());
|
||||
MemoryBuffer &MB = *MBOrErr.get();
|
||||
|
||||
StringRef Hostname;
|
||||
StringRef PIDStr;
|
||||
std::tie(Hostname, PIDStr) = getToken(MB->getBuffer(), " ");
|
||||
std::tie(Hostname, PIDStr) = getToken(MB.getBuffer(), " ");
|
||||
PIDStr = PIDStr.substr(PIDStr.find_first_not_of(" "));
|
||||
int PID;
|
||||
if (!PIDStr.getAsInteger(10, PID)) {
|
||||
|
Reference in New Issue
Block a user