From b095f022a9683a9123018c01e22595cf969fd88b Mon Sep 17 00:00:00 2001 From: David Sehr Date: Fri, 22 Jun 2018 14:38:51 -0700 Subject: Refactor DexFile ownership Avoid bare pointers in DexFileLoader APIs, which caused clang-tidy issues and other problems. Bug: none Test: build and boot Change-Id: Ic277bc83af1997774b42c55d3d631ec940b9c015 --- compiler/optimizing/optimizing_unit_test.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/optimizing_unit_test.h') diff --git a/compiler/optimizing/optimizing_unit_test.h b/compiler/optimizing/optimizing_unit_test.h index a9bc5664c0..a627f65ed4 100644 --- a/compiler/optimizing/optimizing_unit_test.h +++ b/compiler/optimizing/optimizing_unit_test.h @@ -129,12 +129,10 @@ class OptimizingUnitTestHelper { // Create the dex file based on the fake data. Call the constructor so that we can use virtual // functions. Don't use the arena for the StandardDexFile otherwise the dex location leaks. dex_files_.emplace_back(new StandardDexFile( - dex_data, - sizeof(StandardDexFile::Header), + std::make_unique(dex_data, sizeof(StandardDexFile::Header)), "no_location", /*location_checksum*/ 0, - /*oat_dex_file*/ nullptr, - /*container*/ nullptr)); + /*oat_dex_file*/ nullptr)); return new (allocator) HGraph( allocator, -- cgit v1.2.3