Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1bd43fe authored by Jiyong Park's avatar Jiyong Park
Browse files

binder_ndk: fix performance-noexcept-move-constructor

Bug: 162909698
Test: m checkbuild

Change-Id: I4e5db32c4a9015acc6a911659a3526fa03b5ebee
parent d564a98a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -173,8 +173,10 @@ class ScopedAResource {
    ScopedAResource& operator=(const ScopedAResource&) = delete;

    // move-constructing/assignment is okay
    ScopedAResource(ScopedAResource&& other) : mT(std::move(other.mT)) { other.mT = DEFAULT; }
    ScopedAResource& operator=(ScopedAResource&& other) {
    ScopedAResource(ScopedAResource&& other) noexcept : mT(std::move(other.mT)) {
        other.mT = DEFAULT;
    }
    ScopedAResource& operator=(ScopedAResource&& other) noexcept {
        set(other.mT);
        other.mT = DEFAULT;
        return *this;