From 3244042c4c6c16249e0d21a6e6538615d26079c2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 18 Jul 2018 16:17:37 -0400 Subject: [PATCH] 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. --- src/common/telemetry.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/telemetry.h b/src/common/telemetry.h index f96bab4f9..701f5ed74 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h @@ -84,11 +84,11 @@ public: return value; } - inline bool operator==(const Field& other) { + bool operator==(const Field& other) const { return (type == other.type) && (name == other.name) && (value == other.value); } - inline bool operator!=(const Field& other) { + bool operator!=(const Field& other) const { return !(*this == other); }