From 751d464ea3ed8ac00a3481714b0b264f2818bc4a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 22 Mar 2024 14:32:56 -0400 Subject: [PATCH] Clean-up: tests: utils: const_cast MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit clang-tidy warns that const_cast should not be used because of the cppcoreguidelines-pro-type-const-cast rule. In this case, const_cast is not strictly necessary and can be replaced by a static_cast to silence the warning. Signed-off-by: Jérémie Galarneau Change-Id: Iee089716e991c52686a0fdee5a7ac2aae0a30b46 --- tests/utils/bt2_plugins/utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils/bt2_plugins/utils.hpp b/tests/utils/bt2_plugins/utils.hpp index fcf76371c..1d306fd1b 100644 --- a/tests/utils/bt2_plugins/utils.hpp +++ b/tests/utils/bt2_plugins/utils.hpp @@ -17,7 +17,7 @@ namespace bt2 { namespace internal { static inline void bt_value_put_ref(bt_value *value) { - bt_value_put_ref(const_cast(value)); + bt_value_put_ref(static_cast(value)); } } /* namespace internal */ -- 2.34.1