From 0aebe6b3d52403e042522720cb5646ddbcb306d6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 18 Jul 2018 00:27:34 -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 2c945443b8..155cf59ffb 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); }