| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The small string control block moved to the beginning, so it is more cache
local. The control block is cleanup too, so it should be easier to read.
The alignment is removed because it is creating to big holes.
Change-Id: I401aeb9d55455cbaa5e722dd8192e54b525ddc40
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
|
|
|
|
|
| |
Change-Id: I859c801fdb1ad68d5943b580f07a9e8260ae192a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I480ef040a8d9c5b9edc515c7fd58db2fad42dc86
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I38d9716225b81091e8e75b26c9c2258a2aefa987
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
We used only 6 bit to save the short size but for SmallString with a size
over 64 it is not enough. So we have now to use a uint16 instead of a
uint8 if the size if over 64.
Change-Id: I53558e492b6cb40b739b23a8af83d192a2e11bd2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
| |
Thomas provided a smaller fix.
This reverts commit 78fb7f44bf393d8b9e3e22fcccc4ae7951d4bb6e.
Change-Id: I1edff6477526fe4ce29df38852f47fe49117561e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
|
|
|
|
|
|
|
|
| |
* noexcept at wrong postition
* alignment cannot be guaranteed when copying the argument
Change-Id: Ib68788a3fb781e913bd347e6b7932d3280ba9e67
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8a32bcc5e78032777137298f361d94a3d332fc2b.
Broke build with MSVC 2015, update 3
Change-Id: Icb59b70fb00ea2a2ecc8d26c8177d21d82aaccf2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
|
|
|
|
|
|
|
|
| |
We now support constexpr, noexcept and alignas on all compilers. Next will
be C++ 14 constexpr support.
Change-Id: I254049c60dcd82fc373ec907cbb5702a4b344978
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The size of the small string optimization was hard coded. For some use
cases you want a bigger or smaller size. It is now configurable by a
template parameter. For that we changed the name to BasicSmallString and
added an alias of BasicSmallString<31> to SmallString.
Change-Id: I844b4420d260290307a6018bb6cc4cf3ba7bd449
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I681df8c3fd9aa84f14d5d581633894605f56b71a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
std::size_t is a undefined unsigned integer type and std::ptrdiff_t is a
undefined signed integer type. So sometimes the compiler doesn't know
which to choose because both could represent a integer.
Change-Id: I669cd44c6f16854dfe3f3cc44edbfc422e1cbd6a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
|
|
|
|
|
|
|
| |
Kudos to cgmb and https://github.com/cgmb/guardonce
Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
HasAllocated it misleading because it means that it has read only
references too. Maybe isPointing would be good too but so it is more
orthogonal to isReadOnlyReference.
Change-Id: I79aaa271aa302de2500c2ea81614e433d76f74ec
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
There is implicit knowledge that the reference is read only in the code
so we should honor that and make is explicit.
Change-Id: I0d6eab6595ae1414ad2607760a2e02fd49bafd72
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
SmallString is a very simple utf8 string class. It's purpose is performance.
It uses a short string opimization which provides 31 bytes of heap free
memory to save a 30 bytes long string plus null terminator. If the string
gets larger heap is allocated. The grow strategy is 1.5 to improve reuse
of allocated memory.
It uses optionally constexpr to provide string literals.
Change-Id: I7757fb51abfeca200d074cbfce2f1d99edc0ecb0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|