diff options
author | Marc Mutz <marc.mutz@qt.io> | 2023-10-02 07:08:02 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2023-10-05 19:40:03 +0200 |
commit | c3986032a8d74f62447a3a9c9fd8bd96ea030012 (patch) | |
tree | 8e4dddeda49942f9a4330cd4ee4e2c5d9336ff70 /src/corelib/kernel/qpointer.h | |
parent | 4f191cf6578d097e604404efb72c074e608e7338 (diff) |
QPointer: mark the dereference operator noexcept, too
The std types do that on their smart pointer types, so while it's not
100% correct (the function has the precondition !isNull()), follow
upstream and mark this operator noexcept, too.
Change-Id: Ie688598215afe2db4c0c26fcfa192fc7c8e22150
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/kernel/qpointer.h')
-rw-r--r-- | src/corelib/kernel/qpointer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qpointer.h b/src/corelib/kernel/qpointer.h index 25267e388e..8d63f2bc0e 100644 --- a/src/corelib/kernel/qpointer.h +++ b/src/corelib/kernel/qpointer.h @@ -73,7 +73,7 @@ public: { return data(); } T* operator->() const noexcept { return data(); } - inline T& operator*() const + T& operator*() const noexcept { return *data(); } operator T*() const noexcept { return data(); } |