summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2020-11-03 21:20:43 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-11-03 21:20:43 +0000
commit983cf39afb25588f9db48c5715aa7cefc02141fe (patch)
tree73e9040e9c522d347ac4455ec9d1bc2f97e2c315 /libs
parent4d5aef4b8c950509f69d182c8b431e335579d649 (diff)
parent37e8aa52e890e05b29f0f3944def5b7f3b70f5f8 (diff)
Merge "Make ScopedFileDescriptor default ctor implicit" am: 084e1948ae am: 37e8aa52e8
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1485444 Change-Id: I8f528401f4921cf51a7e0106e86f62b138ffc696
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/ndk/include_cpp/android/binder_auto_utils.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/binder/ndk/include_cpp/android/binder_auto_utils.h b/libs/binder/ndk/include_cpp/android/binder_auto_utils.h
index 18877af32a..8d60226725 100644
--- a/libs/binder/ndk/include_cpp/android/binder_auto_utils.h
+++ b/libs/binder/ndk/include_cpp/android/binder_auto_utils.h
@@ -313,7 +313,8 @@ class ScopedFileDescriptor : public impl::ScopedAResource<int, int, close, -1> {
/**
* Takes ownership of a.
*/
- explicit ScopedFileDescriptor(int a = -1) : ScopedAResource(a) {}
+ ScopedFileDescriptor() : ScopedFileDescriptor(-1) {}
+ explicit ScopedFileDescriptor(int a) : ScopedAResource(a) {}
~ScopedFileDescriptor() {}
ScopedFileDescriptor(ScopedFileDescriptor&&) = default;
ScopedFileDescriptor& operator=(ScopedFileDescriptor&&) = default;