runtime: cleanup class_linker out-parameters and formatting
* Use out<T> instead of parameters
* Fixes up some other signatures to be more correct
* Reformat parameters to be one per line if they can't fit on one line
* Reformat locks to be one per line if they can't fit on the decl line
Change-Id: Ib71b08707d3ed0bb85299406c0b23a1de4e92a1c
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index 4f97d20..1b210bb 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -17,6 +17,7 @@
#include "dalvik_system_DexFile.h"
#include "base/logging.h"
+#include "base/out.h"
#include "base/stl_util.h"
#include "base/stringprintf.h"
#include "class_linker.h"
@@ -164,7 +165,8 @@
std::vector<std::unique_ptr<const DexFile>> dex_files;
std::vector<std::string> error_msgs;
- dex_files = linker->OpenDexFilesFromOat(sourceName.c_str(), outputName.c_str(), &error_msgs);
+ dex_files =
+ linker->OpenDexFilesFromOat(sourceName.c_str(), outputName.c_str(), outof(error_msgs));
if (!dex_files.empty()) {
jlongArray array = ConvertNativeToJavaArray(env, dex_files);
diff --git a/runtime/native/java_lang_VMClassLoader.cc b/runtime/native/java_lang_VMClassLoader.cc
index 1515630..62a0b76 100644
--- a/runtime/native/java_lang_VMClassLoader.cc
+++ b/runtime/native/java_lang_VMClassLoader.cc
@@ -16,6 +16,7 @@
#include "java_lang_VMClassLoader.h"
+#include "base/out.h"
#include "class_linker.h"
#include "jni_internal.h"
#include "mirror/class_loader.h"
@@ -45,7 +46,7 @@
// Try the common case.
StackHandleScope<1> hs(soa.Self());
cl->FindClassInPathClassLoader(soa, soa.Self(), descriptor.c_str(), descriptor_hash,
- hs.NewHandle(loader), &c);
+ hs.NewHandle(loader), outof(c));
if (c != nullptr) {
return soa.AddLocalReference<jclass>(c);
}