Skip to content

Commit 42b8712

Browse files
Treehugger RobotAndroid (Google) Code Review
authored andcommitted
Merge "Refactor InputTransferToken equality" into main
2 parents 835688b + 899174a commit 42b8712

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

libs/gui/include/gui/InputTransferToken.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,9 @@ struct InputTransferToken : public RefBase, Parcelable {
3939
return NO_ERROR;
4040
};
4141

42+
bool operator==(const InputTransferToken& other) const { return mToken == other.mToken; }
43+
4244
sp<IBinder> mToken;
4345
};
4446

45-
static inline bool operator==(const sp<InputTransferToken>& token1,
46-
const sp<InputTransferToken>& token2) {
47-
if (token1.get() == token2.get()) {
48-
return true;
49-
}
50-
return token1->mToken == token2->mToken;
51-
}
52-
5347
} // namespace android

0 commit comments

Comments
 (0)