QSharedData: code tidies
Add noexcept and honor the RO3 to silence warnings. In theory this could also be constexpred, but there might still be compilers we support that do not have constexpr initialization for atomics... Change-Id: Ibb94a2f4392908451cf7985d48f999581f03398d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
parent
1df98e6bb9
commit
cfeb09fcc8
|
|
@ -61,11 +61,12 @@ QSharedData
|
|||
public:
|
||||
mutable QAtomicInt ref;
|
||||
|
||||
inline QSharedData() : ref(0) { }
|
||||
inline QSharedData(const QSharedData &) : ref(0) { }
|
||||
inline QSharedData() noexcept : ref(0) { }
|
||||
inline QSharedData(const QSharedData &) noexcept : ref(0) { }
|
||||
|
||||
// using the assignment operator would lead to corruption in the ref-counting
|
||||
QSharedData &operator=(const QSharedData &) = delete;
|
||||
~QSharedData() = default;
|
||||
};
|
||||
|
||||
template <class T> class QSharedDataPointer
|
||||
|
|
|
|||
Loading…
Reference in New Issue