forked from qt-creator/qt-creator
TextEditor: Improve speed of hash function for font settings
The size of the array is fixed so we can simply use the memory patter as a hash value. Change-Id: If86a58b111a07b2bd9cecc12a03d74b93a914159 Task-number: QTCREATORBUG-16419 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
committed by
David Schulz
parent
57042da683
commit
a823caa396
@@ -108,6 +108,11 @@ public:
|
||||
return m_size == 0;
|
||||
}
|
||||
|
||||
void fillWithZero()
|
||||
{
|
||||
std::array<T, MaxSize>::fill(T(0));
|
||||
}
|
||||
|
||||
private:
|
||||
std::uint8_t m_size = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user