summaryrefslogtreecommitdiff
path: root/indra/llcommon/llkeybind.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-10-28 22:53:24 +0200
committerGitHub <noreply@github.com>2024-10-28 22:53:24 +0200
commit9c0a6d1b0e5e9d6da6a63ff367f40ab08c064bbe (patch)
tree70ee7701d7a24a0759915f8050786ed43a8a2a7a /indra/llcommon/llkeybind.cpp
parent0ef7a9b39cf72da1211039ab22bdf8f9f6a2c984 (diff)
parentb2f1e8899b32f681e13705d684db9a93d18450ae (diff)
Merge pull request #2966 from secondlife/marchcat/c-develop
develop → Maint C sync
Diffstat (limited to 'indra/llcommon/llkeybind.cpp')
-rw-r--r--indra/llcommon/llkeybind.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/indra/llcommon/llkeybind.cpp b/indra/llcommon/llkeybind.cpp
index 83c53d220d..73a207504e 100644
--- a/indra/llcommon/llkeybind.cpp
+++ b/indra/llcommon/llkeybind.cpp
@@ -125,20 +125,16 @@ LLKeyData& LLKeyData::operator=(const LLKeyData& rhs)
bool LLKeyData::operator==(const LLKeyData& rhs) const
{
- if (mMouse != rhs.mMouse) return false;
- if (mKey != rhs.mKey) return false;
- if (mMask != rhs.mMask) return false;
- if (mIgnoreMasks != rhs.mIgnoreMasks) return false;
- return true;
+ return
+ (mMouse == rhs.mMouse) &&
+ (mKey == rhs.mKey) &&
+ (mMask == rhs.mMask) &&
+ (mIgnoreMasks == rhs.mIgnoreMasks);
}
bool LLKeyData::operator!=(const LLKeyData& rhs) const
{
- if (mMouse != rhs.mMouse) return true;
- if (mKey != rhs.mKey) return true;
- if (mMask != rhs.mMask) return true;
- if (mIgnoreMasks != rhs.mIgnoreMasks) return true;
- return false;
+ return ! (*this == rhs);
}
bool LLKeyData::canHandle(const LLKeyData& data) const