cleanup: Replace pointers with out-parameters and fix-up formatting
Cleans all of oat_file.h/.cc, parsed_options.h./cc, runtime.h/.cc
Other files are touched only incidentally to use outof(x) instead of &x.
Change-Id: I0bb15111149d53bb21aac2199ef33bd35333b0ca
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 5f5b42f..82cf7af 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -782,7 +782,7 @@
const std::vector<const OatDexFile*>& oat_dex_files = oat_file->GetOatDexFiles();
for (const OatDexFile* oat_dex_file : oat_dex_files) {
std::string error;
- std::unique_ptr<const DexFile> dex_file = oat_dex_file->OpenDexFile(&error);
+ std::unique_ptr<const DexFile> dex_file = oat_dex_file->OpenDexFile(outof(error));
if (dex_file.get() == nullptr) {
LOG(WARNING) << "Could not create dex file from oat file: " << error;
} else {
@@ -1146,7 +1146,7 @@
nullptr);
CHECK(oat_dex_file != nullptr) << oat_file.GetLocation() << " " << dex_file_location;
std::string error_msg;
- std::unique_ptr<const DexFile> dex_file = oat_dex_file->OpenDexFile(&error_msg);
+ std::unique_ptr<const DexFile> dex_file = oat_dex_file->OpenDexFile(outof(error_msg));
if (dex_file.get() == nullptr) {
LOG(FATAL) << "Failed to open dex file " << dex_file_location
<< " from within oat file " << oat_file.GetLocation()