forked from ShuriZma/suyu
1
0
Fork 0

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.
This commit is contained in:
Lioncash 2018-07-18 00:27:34 -04:00
parent 3575d367a4
commit 0aebe6b3d5
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}