From 72ff0d991279c51d053d528e1c011b526c9419f6 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 29 Feb 2024 14:13:46 -0500 Subject: [PATCH] cpp-common/bt2: make `CommonClockClass::uuid` take a `bt2c::UuidView` This, combined with a following patch that makes the constructors of `bt2c::UuidView` implicit, makes it possible to pass a `bt2c::Uuid` object directly to `CommonClockClass::uuid()`. Change-Id: I336763e128bef5de8e208bc7fafcd9df59d7672a Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/11952 Tested-by: jenkins Reviewed-by: Philippe Proulx --- src/cpp-common/bt2/clock-class.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp-common/bt2/clock-class.hpp b/src/cpp-common/bt2/clock-class.hpp index e8780c38..ad033b0e 100644 --- a/src/cpp-common/bt2/clock-class.hpp +++ b/src/cpp-common/bt2/clock-class.hpp @@ -213,9 +213,9 @@ public: return bt_clock_class_get_description(this->libObjPtr()); } - CommonClockClass uuid(const std::uint8_t * const uuid) const noexcept + CommonClockClass uuid(const bt2c::UuidView uuid) const noexcept { - bt_clock_class_set_uuid(this->libObjPtr(), uuid); + bt_clock_class_set_uuid(this->libObjPtr(), uuid.data()); return *this; } -- 2.34.1