Fix: cpp-common/bt2: more specific assertion in `CommonVariantWithIntegerSelectorFiel...
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 13 Mar 2024 15:22:22 +0000 (11:22 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Mar 2024 18:56:36 +0000 (14:56 -0400)
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 <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12051
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
src/cpp-common/bt2/field-class.hpp

index b0420c4f61d7a41d00ce9d797ecbe6e3cdcc84a3..c6c4d690ff7870e93b26ee6bc4852630991c3d9c 100644 (file)
@@ -2423,7 +2423,7 @@ public:
     explicit CommonVariantWithIntegerSelectorFieldClass(const LibObjPtr libObjPtr) noexcept :
         _ThisCommonVariantWithSelectorFieldClass {libObjPtr}
     {
-        BT_ASSERT_DBG(this->isVariant());
+        BT_ASSERT_DBG(this->isVariantWithIntegerSelector());
     }
 
     template <typename OtherLibObjT>
This page took 0.025636 seconds and 4 git commands to generate.