From: Francis Deslauriers Date: Mon, 30 May 2022 19:58:31 +0000 (-0400) Subject: trace-ir.hpp: pass `UuidView` object to `CommonTrace::uuid()` method X-Git-Url: https://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=81d250dbd42b565cfe1d5724d7f2dff88bf8b620 trace-ir.hpp: pass `UuidView` object to `CommonTrace::uuid()` method To simplify the code, the ctf::ir::TraceCls returns a Uuid, so accepting a UuidView here makes it trivial to pass the return of one to the other. Signed-off-by: Francis Deslauriers Change-Id: I1f7a8fa51d932d764d77cd8dafe087cbf89f77b7 Reviewed-on: https://review.lttng.org/c/babeltrace/+/8188 Reviewed-by: Philippe Proulx Reviewed-on: https://review.lttng.org/c/babeltrace/+/10831 CI-Build: Philippe Proulx Tested-by: jenkins --- diff --git a/src/cpp-common/bt2/trace-ir.hpp b/src/cpp-common/bt2/trace-ir.hpp index a7576a56..39ec0b67 100644 --- a/src/cpp-common/bt2/trace-ir.hpp +++ b/src/cpp-common/bt2/trace-ir.hpp @@ -788,9 +788,9 @@ public: return nonstd::nullopt; } - void uuid(const std::uint8_t * const uuid) noexcept + void uuid(const bt2_common::UuidView& uuid) noexcept { - bt_trace_set_uuid(this->libObjPtr(), uuid); + bt_trace_set_uuid(this->libObjPtr(), uuid.begin()); } nonstd::optional uuid() const noexcept