| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #ifndef NET_QUIC_PLATFORM_API_QUIC_PTR_UTIL_H_ | 4 #ifndef NET_QUIC_PLATFORM_API_QUIC_PTR_UTIL_H_ |
| 5 #define NET_QUIC_PLATFORM_API_QUIC_PTR_UTIL_H_ | 5 #define NET_QUIC_PLATFORM_API_QUIC_PTR_UTIL_H_ |
| 6 | 6 |
| 7 #include <memory> |
| 8 #include <utility> |
| 9 |
| 7 #include "net/quic/platform/impl/quic_ptr_util_impl.h" | 10 #include "net/quic/platform/impl/quic_ptr_util_impl.h" |
| 8 | 11 |
| 9 namespace net { | 12 namespace net { |
| 10 | 13 |
| 11 template <typename T, typename... Args> | 14 template <typename T, typename... Args> |
| 12 std::unique_ptr<T> QuicMakeUnique(Args&&... args) { | 15 std::unique_ptr<T> QuicMakeUnique(Args&&... args) { |
| 13 return std::move(QuicMakeUniqueImpl<T>(std::forward<Args>(args)...)); | 16 return QuicMakeUniqueImpl<T>(std::forward<Args>(args)...); |
| 14 } | 17 } |
| 15 | 18 |
| 16 template <typename T> | 19 template <typename T> |
| 17 std::unique_ptr<T> QuicWrapUnique(T* ptr) { | 20 std::unique_ptr<T> QuicWrapUnique(T* ptr) { |
| 18 return std::move(QuicWrapUniqueImpl<T>(ptr)); | 21 return QuicWrapUniqueImpl<T>(ptr); |
| 19 } | 22 } |
| 20 | 23 |
| 21 } // namespace net | 24 } // namespace net |
| 22 | 25 |
| 23 #endif // NET_QUIC_PLATFORM_API_QUIC_PTR_UTIL_H_ | 26 #endif // NET_QUIC_PLATFORM_API_QUIC_PTR_UTIL_H_ |
| OLD | NEW |