From d4f28e863f3ee5d5ff9cfa6a9d60b1bc3bf72c98 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 29 Mar 2021 15:23:55 +0200 Subject: [PATCH] [libcalamares] Allow rvalue Once to be used in logging --- src/libcalamares/utils/Logger.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcalamares/utils/Logger.h b/src/libcalamares/utils/Logger.h index 7b17754e8..9afc78b22 100644 --- a/src/libcalamares/utils/Logger.h +++ b/src/libcalamares/utils/Logger.h @@ -60,7 +60,7 @@ public: virtual ~CDebug(); friend CDebug& operator<<( CDebug&&, const FuncSuppressor& ); - friend CDebug& operator<<( CDebug&&, Once& ); + friend CDebug& operator<<( CDebug&&, const Once& ); private: QString m_msg; @@ -297,14 +297,14 @@ public: : m( true ) { } - friend CDebug& operator<<( CDebug&&, Once& ); + friend CDebug& operator<<( CDebug&&, const Once& ); private: - bool m = false; + mutable bool m = false; }; inline CDebug& -operator<<( CDebug&& s, Once& o ) +operator<<( CDebug&& s, const Once& o ) { if ( o.m ) {