From 1de48a256fa9f754d3171e90345cb6d2db25baba Mon Sep 17 00:00:00 2001 From: Tomasz Wasilczyk Date: Mon, 30 Oct 2023 14:19:19 +0000 Subject: Revert^2 "Use std::unique_ptr instead of ScopeGuard" 25c1a3b8543dd1756308424dd65030f90bb7a99f Test: m Bug: 302723053 Change-Id: Id9355c10d78d0c55afb49f512b78bb0923fbc4f7 --- libs/binder/Parcel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libs/binder/Parcel.cpp') diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 94851c63b5..94f3631b79 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include #include -#include #ifndef BINDER_DISABLE_BLOB #include #endif @@ -92,6 +92,8 @@ static size_t pad_size(size_t s) { namespace android { +using namespace android::binder::impl; + // many things compile this into prebuilts on the stack #ifdef __LP64__ static_assert(sizeof(Parcel) == 120); @@ -584,7 +586,7 @@ status_t Parcel::appendFrom(const Parcel* parcel, size_t offset, size_t len) { } const size_t savedDataPos = mDataPos; - base::ScopeGuard scopeGuard = [&]() { mDataPos = savedDataPos; }; + auto scopeGuard = make_scope_guard([&]() { mDataPos = savedDataPos; }); rpcFields->mObjectPositions.reserve(otherRpcFields->mObjectPositions.size()); if (otherRpcFields->mFds != nullptr) { -- cgit v1.2.3-59-g8ed1b