summaryrefslogtreecommitdiff
path: root/runtime/base/out.h
diff options
context:
space:
mode:
author Igor Murashkin <iam@google.com> 2015-07-30 16:39:45 -0700
committer Igor Murashkin <iam@google.com> 2015-07-31 16:03:00 -0700
commitbc1d78daa463572c5a770cdca858a3b51d8e1b7b (patch)
treed33ae78ec8b5e1f9e4b088545e346306d3c4f04e /runtime/base/out.h
parent8e568d079b052db118d83e6e89ea36ab4fa4bfb1 (diff)
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
Diffstat (limited to 'runtime/base/out.h')
-rw-r--r--runtime/base/out.h7
1 files changed, 6 insertions, 1 deletions
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<T> outof_ptr(T* ptr) {
// Forwards an out parameter from one function into another.
template <typename T>
inline out_convertible<T> outof_forward(out<T>& out_param) {
- T& param = std::addressof(*out_param);
+ T& param = *out_param;
return out_convertible<T>(param);
}