mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 21:29:41 +00:00
[C++11] Pass unique_ptr by value instead of &&.
Suggestion by Richard Smith. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
00e373aa73
commit
0b949e0e9f
@ -40,9 +40,9 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
OwningPtr(std::unique_ptr<T> &&Other) : Ptr(Other.release()) {}
|
OwningPtr(std::unique_ptr<T> Other) : Ptr(Other.release()) {}
|
||||||
|
|
||||||
OwningPtr &operator=(std::unique_ptr<T> &&Other) {
|
OwningPtr &operator=(std::unique_ptr<T> Other) {
|
||||||
reset(Other.release());
|
reset(Other.release());
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user