From 7eb1d0da9928b3bbda8c0dcc3ff1123f94a82d11 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 13 Mar 2024 11:02:02 -0400 Subject: [PATCH] Fix: cpp-common/bt2: don't pass a lib obj ptr when constructing a `CommonNullValue` When trying to use `CommonValue::asNull()`, we get: /home/smarchi/src/babeltrace/src/cpp-common/bt2/value.hpp:1423:55: error: no matching function for call to 'bt2::CommonNullValue::CommonNullValue()' 1423 | return CommonNullValue {this->libObjPtr()}; | ^ The `CommonNullValue` constructor takes no parameter, so don't try to pass one. Change-Id: I653ab947fc36134c8767f39185a9a2cd85511b90 Reviewed-on: https://review.lttng.org/c/babeltrace/+/12050 CI-Build: Simon Marchi Reviewed-by: Philippe Proulx --- src/cpp-common/bt2/value.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp-common/bt2/value.hpp b/src/cpp-common/bt2/value.hpp index 6c3c58ca..14ae5a2b 100644 --- a/src/cpp-common/bt2/value.hpp +++ b/src/cpp-common/bt2/value.hpp @@ -1420,7 +1420,7 @@ template CommonNullValue CommonValue::asNull() const noexcept { BT_ASSERT_DBG(this->isNull()); - return CommonNullValue {this->libObjPtr()}; + return CommonNullValue {}; } template -- 2.34.1