cpp-common/bt2: use bt2c::CStringView in parameters and return values throughout
[babeltrace.git] / src / cpp-common / bt2 / clock-class.hpp
index 6c8c66380588cff939459947c95cec9895ba1259..9e66cbf4290720b561fd2507183fd0aac173a88d 100644 (file)
@@ -173,7 +173,7 @@ public:
         return static_cast<bool>(bt_clock_class_origin_is_unix_epoch(this->libObjPtr()));
     }
 
-    void name(const char * const name) const
+    void name(const bt2c::CStringView name) const
     {
         static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
 
@@ -184,17 +184,12 @@ public:
         }
     }
 
-    void name(const std::string& name) const
-    {
-        this->name(name.data());
-    }
-
     bt2c::CStringView name() const noexcept
     {
         return bt_clock_class_get_name(this->libObjPtr());
     }
 
-    void description(const char * const description) const
+    void description(const bt2c::CStringView description) const
     {
         static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
 
@@ -205,11 +200,6 @@ public:
         }
     }
 
-    void description(const std::string& description) const
-    {
-        this->description(description.data());
-    }
-
     bt2c::CStringView description() const noexcept
     {
         return bt_clock_class_get_description(this->libObjPtr());
This page took 0.023606 seconds and 4 git commands to generate.