tests/lib/conds: change `nameSuffix` type to `bt2c::CStringView`
[babeltrace.git] / tests / lib / conds / conds-triggers.cpp
index c3ce48fa42b4aa8c8997283dd4a03f9b0fc3425e..1a463511b0fcff540748ff98ea82882ee41cdb1b 100644 (file)
@@ -9,6 +9,7 @@
 #include <babeltrace2/babeltrace.h>
 
 #include "cpp-common/bt2/graph.hpp"
+#include "cpp-common/bt2c/c-string-view.hpp"
 
 #include "utils.hpp"
 
@@ -19,8 +20,7 @@ namespace {
  */
 template <typename FuncT>
 CondTrigger *makeSimpleTrigger(FuncT&& func, const CondTrigger::Type type,
-                               const std::string& condId,
-                               const bt2s::optional<std::string>& nameSuffix = bt2s::nullopt)
+                               const std::string& condId, const bt2c::CStringView nameSuffix = {})
 {
     return new SimpleCondTrigger {std::forward<FuncT>(func), type, condId, nameSuffix};
 }
@@ -62,7 +62,7 @@ private:
  */
 CondTrigger *makeRunInCompInitTrigger(OnCompInitFunc func, const CondTrigger::Type type,
                                       const std::string& condId,
-                                      const bt2s::optional<std::string>& nameSuffix = bt2s::nullopt)
+                                      const bt2c::CStringView nameSuffix = {})
 {
     return new RunInCondTrigger<RunInDelegator> {RunInDelegator::makeOnCompInit(std::move(func)),
                                                  type, condId, nameSuffix};
This page took 0.022302 seconds and 4 git commands to generate.