From bc1d78daa463572c5a770cdca858a3b51d8e1b7b Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Thu, 30 Jul 2015 16:39:45 -0700 Subject: runtime: cleanup class_linker out-parameters and formatting * Use out 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 --- runtime/base/out.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/base/out.h') diff --git a/runtime/base/out.h b/runtime/base/out.h index 7199b631e3..7b4bc1216c 100644 --- a/runtime/base/out.h +++ b/runtime/base/out.h @@ -153,6 +153,11 @@ struct out { return param_; } + // Model dereferencing fields/methods on a pointer. + inline T* operator->() { + return std::addressof(param_); + } + // // Comparison against this or other pointers. // @@ -266,7 +271,7 @@ inline out_convertible outof_ptr(T* ptr) { // Forwards an out parameter from one function into another. template inline out_convertible outof_forward(out& out_param) { - T& param = std::addressof(*out_param); + T& param = *out_param; return out_convertible(param); } -- cgit v1.2.3-59-g8ed1b