diff options
| author | 2020-11-03 21:33:19 +0000 | |
|---|---|---|
| committer | 2020-11-03 21:33:19 +0000 | |
| commit | c7ca08ca010c98c50a592b844060e69d8c0f3bcb (patch) | |
| tree | 5c3da0dea8103864f210808711c28d0bcbd50d5d | |
| parent | b06e5dce10ed17aed0ce901901fddc4843efff25 (diff) | |
| parent | 983cf39afb25588f9db48c5715aa7cefc02141fe (diff) | |
Merge "Make ScopedFileDescriptor default ctor implicit" am: 084e1948ae am: 37e8aa52e8 am: 983cf39afb
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1485444
Change-Id: I86f8387b2c653f0b589d5dbabb2a75b676c1676d
| -rw-r--r-- | libs/binder/ndk/include_cpp/android/binder_auto_utils.h | 3 |
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; |