Commit Graph

2 Commits

Author SHA1 Message Date
Marco Bubke
a823caa396 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>
2016-06-10 06:27:19 +00:00
Marco Bubke
0f61908ab0 Utils: Add sized array
Sometimes you need a very small array which has a size and max size.
QVarLengthArray is simular but has some size and run time overhead and it
has no max size. It will instead malloc. So this array is for very small
collections under 256 values which never allocate and have only a size
overhead of a byte.

Change-Id: Ia392c750d566c4accc6077c3dc4d9d4ae501e599
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-22 14:53:12 +00:00