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

Commit ce124d3c authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I4e5db32c,I2a448282 am: 5b4e68d7 am: 021cae6f am: c63f6b05

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1499831

Change-Id: Ib2840e65f8065a5638d9df73345e5b893a49731f
parents 4c2eeff7 c63f6b05
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -74,6 +74,9 @@ class SpAIBinder {
     * ownership of that other object.
     * ownership of that other object.
     */
     */
    SpAIBinder& operator=(const SpAIBinder& other) {
    SpAIBinder& operator=(const SpAIBinder& other) {
        if (this == &other) {
            return *this;
        }
        AIBinder_incStrong(other.mBinder);
        AIBinder_incStrong(other.mBinder);
        set(other.mBinder);
        set(other.mBinder);
        return *this;
        return *this;
@@ -170,8 +173,10 @@ class ScopedAResource {
    ScopedAResource& operator=(const ScopedAResource&) = delete;
    ScopedAResource& operator=(const ScopedAResource&) = delete;


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