From e2648e418fb77fa4708e45ed2d26ca3501a57bc0 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 9 May 2024 09:12:29 +0200 Subject: [PATCH] test: minor changes --- test/common/aggregate.h | 4 ++-- test/common/pointer_stable.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common/aggregate.h b/test/common/aggregate.h index 7b3176af4..5c007a65c 100644 --- a/test/common/aggregate.h +++ b/test/common/aggregate.h @@ -9,11 +9,11 @@ struct aggregate { int value{}; }; -inline bool operator==(const aggregate &lhs, const aggregate &rhs) { +[[nodiscard]] inline bool operator==(const aggregate &lhs, const aggregate &rhs) { return lhs.value == rhs.value; } -inline bool operator<(const aggregate &lhs, const aggregate &rhs) { +[[nodiscard]] inline bool operator<(const aggregate &lhs, const aggregate &rhs) { return lhs.value < rhs.value; } diff --git a/test/common/pointer_stable.h b/test/common/pointer_stable.h index f4836b7c3..abf88bae1 100644 --- a/test/common/pointer_stable.h +++ b/test/common/pointer_stable.h @@ -8,11 +8,11 @@ struct pointer_stable { int value{}; }; -inline bool operator==(const pointer_stable &lhs, const pointer_stable &rhs) { +[[nodiscard]] inline bool operator==(const pointer_stable &lhs, const pointer_stable &rhs) { return lhs.value == rhs.value; } -inline bool operator<(const pointer_stable &lhs, const pointer_stable &rhs) { +[[nodiscard]] inline bool operator<(const pointer_stable &lhs, const pointer_stable &rhs) { return lhs.value < rhs.value; }