diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-10-13 10:25:21 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-10-13 10:27:13 +0200 |
commit | 3e08154582edae4ae53ecd3f5b4eec2272eddf50 (patch) | |
tree | ee13968006ace8c4ca007607d29f30545683d785 /src | |
parent | d5c53554e5d71e3518a446b634428bb66fc369fd (diff) |
Mark the class QPropertyObserverNodeProtector as [[nodiscard]]
And not its constructor, as GCC at least doesn't like that.
Change-Id: I4aada7ca7135dd9c599980640588e7c98d398171
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qproperty.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index d165e155fb..3c4a48ed37 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -454,7 +454,7 @@ void QPropertyObserverPointer::setBindingToMarkDirty(QPropertyBindingPrivate *bi for QPropertyObserverPointer::notify (described ibidem) */ template <QPropertyObserver::ObserverTag tag> -struct QPropertyObserverNodeProtector { +struct [[nodiscard]] QPropertyObserverNodeProtector { QPropertyObserver m_placeHolder; QPropertyObserver *&m_observer; union { |