From d8e57f7413684c01b8c6bb34eeda4f0bc5f36abe Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 13 Mar 2024 00:14:36 -0400 Subject: [PATCH] cpp-common/bt2: make `getSupportedMipVersions` methods take a `ConstMapValue` The "get_supported_mip_versions" component class methods always receive a map value. The equivalent methods in the C++ bindings should therefore take a `ConstMapValue. Change-Id: Ia3ba17048337d3abb72cefa2ae88c7b3187833f2 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/12048 Reviewed-by: Philippe Proulx Tested-by: jenkins --- src/cpp-common/bt2/component-class-dev.hpp | 12 ++++++------ src/cpp-common/bt2/internal/comp-cls-bridge.hpp | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cpp-common/bt2/component-class-dev.hpp b/src/cpp-common/bt2/component-class-dev.hpp index d7a46edd..b89ac6b2 100644 --- a/src/cpp-common/bt2/component-class-dev.hpp +++ b/src/cpp-common/bt2/component-class-dev.hpp @@ -131,7 +131,7 @@ public: } static void getSupportedMipVersions(const SelfComponentClass selfCompCls, - const ConstValue params, const LoggingLevel loggingLevel, + const ConstMapValue params, const LoggingLevel loggingLevel, const UnsignedIntegerRangeSet ranges) { UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges); @@ -152,7 +152,7 @@ protected: } /* Overloadable */ - static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel, + static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel, const UnsignedIntegerRangeSet ranges) { ranges.addRange(0, 0); @@ -235,7 +235,7 @@ public: } static void getSupportedMipVersions(const SelfComponentClass selfCompCls, - const ConstValue params, const LoggingLevel loggingLevel, + const ConstMapValue params, const LoggingLevel loggingLevel, const UnsignedIntegerRangeSet ranges) { UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges); @@ -262,7 +262,7 @@ protected: } /* Overloadable */ - static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel, + static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel, const UnsignedIntegerRangeSet ranges) { ranges.addRange(0, 0); @@ -362,7 +362,7 @@ public: } static void getSupportedMipVersions(const SelfComponentClass selfCompCls, - const ConstValue params, const LoggingLevel loggingLevel, + const ConstMapValue params, const LoggingLevel loggingLevel, const UnsignedIntegerRangeSet ranges) { UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges); @@ -393,7 +393,7 @@ protected: } /* Overloadable */ - static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel, + static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel, const UnsignedIntegerRangeSet ranges) { ranges.addRange(0, 0); diff --git a/src/cpp-common/bt2/internal/comp-cls-bridge.hpp b/src/cpp-common/bt2/internal/comp-cls-bridge.hpp index 6b16e733..a9474b95 100644 --- a/src/cpp-common/bt2/internal/comp-cls-bridge.hpp +++ b/src/cpp-common/bt2/internal/comp-cls-bridge.hpp @@ -92,9 +92,9 @@ public: bt_integer_range_set_unsigned * const libSupportedVersionsPtr) noexcept { try { - UserCompClsT::getSupportedMipVersions(wrap(libSelfCompClsPtr), wrap(libParamsPtr), - static_cast(logLevel), - wrap(libSupportedVersionsPtr)); + UserCompClsT::getSupportedMipVersions( + wrap(libSelfCompClsPtr), wrap(libParamsPtr).asMap(), + static_cast(logLevel), wrap(libSupportedVersionsPtr)); return BT_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_STATUS_OK; } catch (const std::bad_alloc&) { return BT_COMPONENT_CLASS_GET_SUPPORTED_MIP_VERSIONS_METHOD_STATUS_MEMORY_ERROR; -- 2.34.1