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

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

Issue 1942823002: Remove webrtc/base/scoped_ptr.h (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix additional scoped_ptr uses that had been added 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/messagehandler.h ('k') | webrtc/common_audio/real_fourier.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 // This entire file is deprecated, and will be removed in XXXX 2016. Use
12 // std::unique_ptr instead!
13
14 #ifndef WEBRTC_BASE_SCOPED_PTR_H__
15 #define WEBRTC_BASE_SCOPED_PTR_H__
16
17 // All these #includes are left to maximize backwards compatibility.
18
19 #include <assert.h>
20 #include <stddef.h>
21 #include <stdlib.h>
22
23 #include <algorithm>
24 #include <cstddef>
25 #include <memory>
26
27 #include "webrtc/base/constructormagic.h"
28 #include "webrtc/base/template_util.h"
29 #include "webrtc/typedefs.h"
30
31 namespace rtc {
32
33 template <typename T, typename Deleter = std::default_delete<T>>
34 using scoped_ptr = std::unique_ptr<T, Deleter>;
35
36 // These used to convert between std::unique_ptr and std::unique_ptr. Now they
37 // are no-ops.
38 template <typename T>
39 std::unique_ptr<T> ScopedToUnique(std::unique_ptr<T> up) {
40 return up;
41 }
42 template <typename T>
43 std::unique_ptr<T> UniqueToScoped(std::unique_ptr<T> up) {
44 return up;
45 }
46
47 } // namespace rtc
48
49 #endif // #ifndef WEBRTC_BASE_SCOPED_PTR_H__
OLDNEW
« no previous file with comments | « webrtc/base/messagehandler.h ('k') | webrtc/common_audio/real_fourier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698