Return constant reference from OperationDetail::get_treepath() (!94)

Closes !94 - Make more getter methods use return-by-constant-reference
This commit is contained in:
Mike Fleetwood 2021-11-06 13:39:04 +00:00 committed by Curtis Gedak
parent 1f6e81295b
commit 901f03c19d
2 changed files with 3 additions and 2 deletions

View File

@ -63,7 +63,7 @@ public:
void set_success_and_capture_errors( bool success );
OperationDetailStatus get_status() const ;
void set_treepath( const Glib::ustring & treepath ) ;
Glib::ustring get_treepath() const ;
const Glib::ustring& get_treepath() const;
Glib::ustring get_elapsed_time() const ;
void add_child( const OperationDetail & operationdetail ) ;

View File

@ -125,7 +125,8 @@ void OperationDetail::set_treepath( const Glib::ustring & treepath )
this ->treepath = treepath ;
}
Glib::ustring OperationDetail::get_treepath() const
const Glib::ustring& OperationDetail::get_treepath() const
{
return treepath ;
}