projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
00e373a
)
[C++11] Pass unique_ptr by value instead of &&.
author
Ahmed Charles
<ahmedcharles@gmail.com>
Mon, 3 Mar 2014 07:15:46 +0000
(07:15 +0000)
committer
Ahmed Charles
<ahmedcharles@gmail.com>
Mon, 3 Mar 2014 07:15:46 +0000
(07:15 +0000)
Suggestion by Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202678
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/OwningPtr.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/OwningPtr.h
b/include/llvm/ADT/OwningPtr.h
index 4ee00ef6e804ff39e01cf376ade8cf0c106f0886..5453d5c84e47108eac17e89f6e87c48466f75c20 100644
(file)
--- a/
include/llvm/ADT/OwningPtr.h
+++ b/
include/llvm/ADT/OwningPtr.h
@@
-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());
return *this;
}
reset(Other.release());
return *this;
}