@@ -112,7 +112,7 @@ class ario
112112 operator std::string () const { return name; }
113113 operator std::string_view () const { return name; }
114114 operator const char *() const { return name.c_str (); }
115- bool operator ==( const std::string& name ) const
115+ bool operator ==( std::string_view name ) const
116116 {
117117 return this ->name == name;
118118 }
@@ -123,7 +123,7 @@ class ario
123123 this ->pstream = pstream;
124124 }
125125
126- void set_new_data ( const std::string& data ) { this ->new_data = data; }
126+ void set_new_data ( std::string_view data ) { this ->new_data = data; }
127127
128128 protected:
129129 std::string short_name = {}; // /< Short name of the member
@@ -235,7 +235,7 @@ class ario
235235
236236 // ------------------------------------------------------------------------------
237237 // ! @brief Constructor
238- explicit ario () : members( this ){};
238+ explicit ario () : members( this ) {};
239239 ario ( const ario& ) = delete ;
240240 ario& operator =( const ario& ) = delete ;
241241 ario ( ario&& ) = delete ;
@@ -411,7 +411,7 @@ class ario
411411 // ! @param member The member to add
412412 // ! @param data The data associated with the member
413413 // ! @return Error object indicating success or failure
414- Result add_member ( const Member& member, const std::string& data )
414+ Result add_member ( const Member& member, std::string_view data )
415415 {
416416 // Don't allow empty member names
417417 if ( member.name .empty () ) {
0 commit comments