X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Flib%2Fconds%2Futils.cpp;fp=tests%2Flib%2Fconds%2Futils.cpp;h=d393c618a0689bf8fd98efa6a3359f00a7cf41e0;hp=9bf5450fe5bf56ab461c54e80ccab1439edc5b47;hb=4ad4365795e89089c88b28c483bb19fe77091632;hpb=d8451d46404b3f4119808d29d21b8ffa10130e1f diff --git a/tests/lib/conds/utils.cpp b/tests/lib/conds/utils.cpp index 9bf5450f..d393c618 100644 --- a/tests/lib/conds/utils.cpp +++ b/tests/lib/conds/utils.cpp @@ -17,17 +17,16 @@ #include "utils.hpp" CondTrigger::CondTrigger(const Type type, const std::string& condId, - const bt2s::optional& nameSuffix) noexcept : + const bt2c::CStringView nameSuffix) noexcept : _mType {type}, _mCondId {fmt::format("{}:{}", type == Type::PRE ? "pre" : "post", condId)}, - _mName { - fmt::format("{}{}{}", condId, nameSuffix ? "-" : "", nameSuffix ? nameSuffix->data() : "")} + _mName {fmt::format("{}{}{}", condId, nameSuffix ? "-" : "", nameSuffix ? nameSuffix : "")} { } SimpleCondTrigger::SimpleCondTrigger(std::function func, const Type type, const std::string& condId, - const bt2s::optional& nameSuffix) : + const bt2c::CStringView nameSuffix) : CondTrigger {type, condId, nameSuffix}, _mFunc {std::move(func)} {