From 5ca48ae961d956ce188ff45b2d2c04127874276a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 13 Mar 2024 11:22:22 -0400 Subject: [PATCH] Fix: cpp-common/bt2: more specific assertion in `CommonVariantWithIntegerSelectorFieldClass` constructor It seems like we can check that the field class is not only a variant, but more specifically a variant with integer selector. Change-Id: Ib062779d957ba1e859247c891027121479ae3adb Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/12051 Reviewed-by: Philippe Proulx --- src/cpp-common/bt2/field-class.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp-common/bt2/field-class.hpp b/src/cpp-common/bt2/field-class.hpp index b0420c4f..c6c4d690 100644 --- a/src/cpp-common/bt2/field-class.hpp +++ b/src/cpp-common/bt2/field-class.hpp @@ -2423,7 +2423,7 @@ public: explicit CommonVariantWithIntegerSelectorFieldClass(const LibObjPtr libObjPtr) noexcept : _ThisCommonVariantWithSelectorFieldClass {libObjPtr} { - BT_ASSERT_DBG(this->isVariant()); + BT_ASSERT_DBG(this->isVariantWithIntegerSelector()); } template -- 2.34.1