aboutsummaryrefslogtreecommitdiffstats
path: root/brillo
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2017-06-30 17:03:45 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-07-06 01:33:12 -0700
commit070af5efe6be713dc10310405c3951939fda828a (patch)
treecdf674e93655aba9495971675cc2f93049c8c901 /brillo
parent7a0a61f2e3ae80b7edd5e774b8b3318f81e7c3c6 (diff)
downloadplatform_external_libbrillo-070af5efe6be713dc10310405c3951939fda828a.tar.gz
platform_external_libbrillo-070af5efe6be713dc10310405c3951939fda828a.tar.bz2
platform_external_libbrillo-070af5efe6be713dc10310405c3951939fda828a.zip
Remove brillo::make_unique_ptr.
base::MakeUnique mimics std::make_unique and is preferred over brillo::make_unique_ptr (which is identical to base::WrapUnique). Dependents of brillo::make_unique_ptr have been migrated to use base::MakeUnique and base::WrapUnique. This CL removes brillo::make_unique_ptr from libbrillo. BUG=chromium:704644 TEST=Run unit tests. Change-Id: I8e034988149f465e12114d4568367022f1e21d6d Reviewed-on: https://chromium-review.googlesource.com/558379 Commit-Ready: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'brillo')
-rw-r--r--brillo/make_unique_ptr.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/brillo/make_unique_ptr.h b/brillo/make_unique_ptr.h
deleted file mode 100644
index 89f56e6..0000000
--- a/brillo/make_unique_ptr.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2015 The Chromium OS Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef LIBBRILLO_BRILLO_MAKE_UNIQUE_PTR_H_
-#define LIBBRILLO_BRILLO_MAKE_UNIQUE_PTR_H_
-
-#include <memory>
-
-namespace brillo {
-
-// A function to convert T* into unique_ptr<T>
-// Doing e.g. make_unique_ptr(new FooBarBaz<type>(arg)) is a shorter notation
-// for unique_ptr<FooBarBaz<type>>(new FooBarBaz<type>(arg))
-// Basically the same as Chromium's make_scoped_ptr().
-// Deliberately not named "make_unique" to avoid conflicting with the similar,
-// but more complex and semantically different C++14 function.
-template <typename T>
-std::unique_ptr<T> make_unique_ptr(T* ptr) {
- return std::unique_ptr<T>(ptr);
-}
-
-} // namespace brillo
-
-#endif // LIBBRILLO_BRILLO_MAKE_UNIQUE_PTR_H_