[libcalamares] Allow rvalue Once to be used in logging
This commit is contained in:
parent
785042ccf3
commit
d4f28e863f
@ -60,7 +60,7 @@ public:
|
|||||||
virtual ~CDebug();
|
virtual ~CDebug();
|
||||||
|
|
||||||
friend CDebug& operator<<( CDebug&&, const FuncSuppressor& );
|
friend CDebug& operator<<( CDebug&&, const FuncSuppressor& );
|
||||||
friend CDebug& operator<<( CDebug&&, Once& );
|
friend CDebug& operator<<( CDebug&&, const Once& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_msg;
|
QString m_msg;
|
||||||
@ -297,14 +297,14 @@ public:
|
|||||||
: m( true )
|
: m( true )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
friend CDebug& operator<<( CDebug&&, Once& );
|
friend CDebug& operator<<( CDebug&&, const Once& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m = false;
|
mutable bool m = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline CDebug&
|
inline CDebug&
|
||||||
operator<<( CDebug&& s, Once& o )
|
operator<<( CDebug&& s, const Once& o )
|
||||||
{
|
{
|
||||||
if ( o.m )
|
if ( o.m )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user