From: Simon Marchi Date: Thu, 29 Feb 2024 19:13:46 +0000 (-0500) Subject: cpp-common/bt2: make `CommonClockClass::uuid` take a `bt2c::UuidView` X-Git-Url: https://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=72ff0d991279c51d053d528e1c011b526c9419f6 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 --- 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; }