ART: Update stl_util.h
Replace MakeUnique with std::make_unique. Remove unused functions.
Test: m
Change-Id: I3afdc0529cd6fb9d1797e5294a3d5ea2f6b38fc7
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 21e0724..3dd0703 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -1402,8 +1402,8 @@
// Note: we're only invalidating the magic data in the file, as dex2oat needs the rest of
// the information to remain valid.
if (update_input_vdex_) {
- std::unique_ptr<BufferedOutputStream> vdex_out(MakeUnique<BufferedOutputStream>(
- MakeUnique<FileOutputStream>(vdex_files_.back().get())));
+ std::unique_ptr<BufferedOutputStream> vdex_out = std::make_unique<BufferedOutputStream>(
+ std::make_unique<FileOutputStream>(vdex_files_.back().get()));
if (!vdex_out->WriteFully(&VdexFile::Header::kVdexInvalidMagic,
arraysize(VdexFile::Header::kVdexInvalidMagic))) {
PLOG(ERROR) << "Failed to invalidate vdex header. File: " << vdex_out->GetLocation();
@@ -1900,8 +1900,8 @@
verifier::VerifierDeps* verifier_deps = callbacks_->GetVerifierDeps();
for (size_t i = 0, size = oat_files_.size(); i != size; ++i) {
File* vdex_file = vdex_files_[i].get();
- std::unique_ptr<BufferedOutputStream> vdex_out(
- MakeUnique<BufferedOutputStream>(MakeUnique<FileOutputStream>(vdex_file)));
+ std::unique_ptr<BufferedOutputStream> vdex_out =
+ std::make_unique<BufferedOutputStream>(std::make_unique<FileOutputStream>(vdex_file));
if (!oat_writers_[i]->WriteVerifierDeps(vdex_out.get(), verifier_deps)) {
LOG(ERROR) << "Failed to write verifier dependencies into VDEX " << vdex_file->GetPath();
@@ -2933,7 +2933,7 @@
// might produce a stack frame too large for this function or for
// functions inlining it (such as main), that would not fit the
// requirements of the `-Wframe-larger-than` option.
- std::unique_ptr<Dex2Oat> dex2oat = MakeUnique<Dex2Oat>(&timings);
+ std::unique_ptr<Dex2Oat> dex2oat = std::make_unique<Dex2Oat>(&timings);
// Parse arguments. Argument mistakes will lead to exit(EXIT_FAILURE) in UsageError.
dex2oat->ParseArgs(argc, argv);