QFont::Tag: optimize toString by not searching for terminating null
The compiler knows how large the array is, so pass the size and drop the terminating null. Pick-to: 6.7 Change-Id: I5795c89834b8395f04d1777d737d080f19be2a21 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>bb10
parent
88c3cd6e08
commit
a73f10aee4
|
|
@ -231,9 +231,8 @@ public:
|
|||
char((m_value & 0xff000000) >> 24),
|
||||
char((m_value & 0x00ff0000) >> 16),
|
||||
char((m_value & 0x0000ff00) >> 8),
|
||||
char((m_value & 0x000000ff)),
|
||||
0 };
|
||||
return QByteArray(data);
|
||||
char((m_value & 0x000000ff)) };
|
||||
return QByteArray(data, sizeof(data));
|
||||
}
|
||||
|
||||
static constexpr std::optional<Tag> fromValue(quint32 value) noexcept
|
||||
|
|
|
|||
Loading…
Reference in New Issue