From: Simon Marchi Date: Fri, 31 May 2024 16:32:14 +0000 (-0400) Subject: Fix: cpp-common/bt2: make QueryExecutor take ConstValue params X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=e17788b9ac90c5121b41a2f2099f50ac89cec27b;p=babeltrace.git Fix: cpp-common/bt2: make QueryExecutor take ConstValue params Query executors can take values of any kind, not specifically map values. From the doc [1]: Unlike the params parameter of the bt_graph_add_*_component_*_port_added_listener() functions (see Graph), this parameter does not need to be a map value. Change `ConstMapValue` to `ConstValue`. [1] https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-qexec.html#gafb5d324988c2870d66d96c1eeda6f87a Change-Id: I370182c4aa5df8957c025f59018e359463674156 Reviewed-on: https://review.lttng.org/c/babeltrace/+/12829 CI-Build: Simon Marchi Tested-by: jenkins Reviewed-by: Philippe Proulx --- diff --git a/src/cpp-common/bt2/query-executor.hpp b/src/cpp-common/bt2/query-executor.hpp index b610b3fd..5e8d51ab 100644 --- a/src/cpp-common/bt2/query-executor.hpp +++ b/src/cpp-common/bt2/query-executor.hpp @@ -63,7 +63,7 @@ public: } static Shared create(const ConstComponentClass compCls, const bt2c::CStringView objectName, - const OptionalBorrowedObject params = {}) + const OptionalBorrowedObject params = {}) { return CommonQueryExecutor::_create(compCls, objectName, params, static_cast(nullptr)); @@ -72,7 +72,7 @@ public: template static Shared create(const ConstComponentClass compCls, const bt2c::CStringView objectName, QueryDataT& queryData, - const OptionalBorrowedObject params = {}) + const OptionalBorrowedObject params = {}) { return CommonQueryExecutor::_create(compCls, objectName, params, &queryData); } @@ -101,7 +101,7 @@ public: private: template static Shared _create(const ConstComponentClass compCls, const bt2c::CStringView objectName, - const OptionalBorrowedObject params, + const OptionalBorrowedObject params, QueryDataT * const queryData) { const auto libObjPtr = bt_query_executor_create_with_method_data(