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. Change-Id: I5795c89834b8395f04d1777d737d080f19be2a21 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> (cherry picked from commit a73f10aee422bbbee22c63ff1c436cb3193938e6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
f9d97ee04a
commit
64c906f59e
@ -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…
x
Reference in New Issue
Block a user