Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: webrtc/base/scoped_ptr.h

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/optional.h ('k') | webrtc/base/thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 #include "webrtc/base/constructormagic.h" 27 #include "webrtc/base/constructormagic.h"
28 #include "webrtc/base/template_util.h" 28 #include "webrtc/base/template_util.h"
29 #include "webrtc/typedefs.h" 29 #include "webrtc/typedefs.h"
30 30
31 namespace rtc { 31 namespace rtc {
32 32
33 template <typename T, typename Deleter = std::default_delete<T>> 33 template <typename T, typename Deleter = std::default_delete<T>>
34 using scoped_ptr = std::unique_ptr<T, Deleter>; 34 using scoped_ptr = std::unique_ptr<T, Deleter>;
35 35
36 // These used to convert between rtc::scoped_ptr and std::unique_ptr. Now they 36 // These used to convert between std::unique_ptr and std::unique_ptr. Now they
37 // are no-ops. 37 // are no-ops.
38 template <typename T> 38 template <typename T>
39 std::unique_ptr<T> ScopedToUnique(std::unique_ptr<T> up) { 39 std::unique_ptr<T> ScopedToUnique(std::unique_ptr<T> up) {
40 return up; 40 return up;
41 } 41 }
42 template <typename T> 42 template <typename T>
43 std::unique_ptr<T> UniqueToScoped(std::unique_ptr<T> up) { 43 std::unique_ptr<T> UniqueToScoped(std::unique_ptr<T> up) {
44 return up; 44 return up;
45 } 45 }
46 46
47 } // namespace rtc 47 } // namespace rtc
48 48
49 #endif // #ifndef WEBRTC_BASE_SCOPED_PTR_H__ 49 #endif // #ifndef WEBRTC_BASE_SCOPED_PTR_H__
OLDNEW
« no previous file with comments | « webrtc/base/optional.h ('k') | webrtc/base/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698