From af6dc12eba855e32e642e196db49d6bc72dbd6ef Mon Sep 17 00:00:00 2001 From: Alexander Dahl Date: Thu, 28 Sep 2023 10:11:40 +0200 Subject: [PATCH] hm: Fix ignored qualifiers warning When building with -Wextra this warning popped up. It's useless to return a const bool here, because it's a copy anyway. Instead for C++ const correctness a getter has the keyword in the back which means you won't change your object when calling this method. Fixes: 51fbe7868c64 ("added command queue") --- src/hm/hmInverter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hm/hmInverter.h b/src/hm/hmInverter.h index 54355da5..48b558ba 100644 --- a/src/hm/hmInverter.h +++ b/src/hm/hmInverter.h @@ -88,7 +88,7 @@ class CommandAbstract { }; virtual ~CommandAbstract() {}; - const uint8_t getCmd() { + uint8_t getCmd() const { return _Cmd; }