Просмотр исходного кода

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.
Lioncash 8 лет назад
Родитель
Сommit
0aebe6b3d5
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/common/telemetry.h

+ 2 - 2
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);
     }