diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-18 00:27:34 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-18 00:28:47 -0400 |
commit | 0aebe6b3d52403e042522720cb5646ddbcb306d6 (patch) | |
tree | 5a5d3665b7978dffe64830886174a6d1c8a61a92 /src/common | |
parent | 3575d367a4aafa1810feab9ba1effbad11a57702 (diff) |
telemetry: Make operator== and operator!= const member functions of Field
These operators don't modify internal class state, so they can be made
const member functions. While we're at it, drop the unnecessary inline
keywords. Member functions that are defined in the class declaration are
already inline by default.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/telemetry.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/telemetry.h b/src/common/telemetry.h index 2c945443b..155cf59ff 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h @@ -84,11 +84,11 @@ public: return value; } - inline bool operator==(const Field<T>& other) { + bool operator==(const Field& other) const { return (type == other.type) && (name == other.name) && (value == other.value); } - inline bool operator!=(const Field<T>& other) { + bool operator!=(const Field& other) const { return !(*this == other); } |