QUuid: drop the noexcept of fromBytes()
The function has a precondition, namely that [bytes, 16) be a valid range. Therefore it cannot be noexcept. Found in API review. Change-Id: Idcc61cdc3b1cbffc20a86b0dbc4eb17e51c1becd Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c8d04c1a37c5f307a8e27f8897d5868286fb32cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
f974ea6f86
commit
a1b79d137f
@ -102,8 +102,7 @@ public:
|
||||
inline Id128Bytes toBytes(QSysInfo::Endian order = QSysInfo::BigEndian) const noexcept;
|
||||
QByteArray toRfc4122() const;
|
||||
|
||||
static inline
|
||||
QUuid fromBytes(const void *bytes, QSysInfo::Endian order = QSysInfo::BigEndian) noexcept;
|
||||
static inline QUuid fromBytes(const void *bytes, QSysInfo::Endian order = QSysInfo::BigEndian);
|
||||
#if QT_CORE_REMOVED_SINCE(6, 3)
|
||||
static QUuid fromRfc4122(const QByteArray &);
|
||||
#endif
|
||||
@ -235,7 +234,7 @@ QUuid::Id128Bytes QUuid::toBytes(QSysInfo::Endian order) const noexcept
|
||||
return result;
|
||||
}
|
||||
|
||||
QUuid QUuid::fromBytes(const void *bytes, QSysInfo::Endian order) noexcept
|
||||
QUuid QUuid::fromBytes(const void *bytes, QSysInfo::Endian order)
|
||||
{
|
||||
Id128Bytes result = {};
|
||||
memcpy(result.data, bytes, sizeof(result));
|
||||
|
Loading…
x
Reference in New Issue
Block a user