Return constant reference from ProgressBar::get_text()
get_text() only performs const access on the ProgressBar object so
return the member string by constant reference.
Previously done for other string returning getters, even though the
value is assigned to a variable and doesn't save anything:
1f6e81295b
Return constant reference from OperationDetail::get_description() (!94)
This commit is contained in:
parent
f5ba53fb3e
commit
af684ade52
|
@ -41,7 +41,7 @@ public:
|
||||||
void stop();
|
void stop();
|
||||||
bool running() const;
|
bool running() const;
|
||||||
double get_fraction() const;
|
double get_fraction() const;
|
||||||
Glib::ustring get_text() const;
|
const Glib::ustring& get_text() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ProgressBar( const ProgressBar & src ); // Not implemented copy constructor
|
ProgressBar( const ProgressBar & src ); // Not implemented copy constructor
|
||||||
|
|
|
@ -68,7 +68,8 @@ double ProgressBar::get_fraction() const
|
||||||
return m_fraction;
|
return m_fraction;
|
||||||
}
|
}
|
||||||
|
|
||||||
Glib::ustring ProgressBar::get_text() const
|
|
||||||
|
const Glib::ustring& ProgressBar::get_text() const
|
||||||
{
|
{
|
||||||
return m_text;
|
return m_text;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue