Return constant reference from OperationDetail::get_description() (!94)
All uses of get_description() copy construct to a local variable, not assign to a reference, so this doesn't save anything. It is just being done to be consistent with making other getters return a constant reference. Closes !94 - Make more getter methods use return-by-constant-reference
This commit is contained in:
parent
81f5dc3ead
commit
1f6e81295b
|
@ -58,7 +58,7 @@ public:
|
|||
OperationDetailStatus status = STATUS_EXECUTE,
|
||||
Font font = FONT_NORMAL ) ;
|
||||
void set_description( const Glib::ustring & description, Font font = FONT_NORMAL ) ;
|
||||
Glib::ustring get_description() const ;
|
||||
const Glib::ustring& get_description() const;
|
||||
void set_status( OperationDetailStatus status ) ;
|
||||
void set_success_and_capture_errors( bool success );
|
||||
OperationDetailStatus get_status() const ;
|
||||
|
|
|
@ -75,11 +75,13 @@ void OperationDetail::set_description( const Glib::ustring & description, Font f
|
|||
on_update( *this ) ;
|
||||
}
|
||||
|
||||
Glib::ustring OperationDetail::get_description() const
|
||||
|
||||
const Glib::ustring& OperationDetail::get_description() const
|
||||
{
|
||||
return description ;
|
||||
}
|
||||
|
||||
|
||||
void OperationDetail::set_status( OperationDetailStatus status )
|
||||
{
|
||||
if ( this ->status != STATUS_ERROR )
|
||||
|
|
Loading…
Reference in New Issue