forked from qt-creator/qt-creator
Utils: Improve SmallString
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>
This commit is contained in:
@@ -79,6 +79,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
SmallStringView(const const_iterator begin, const const_iterator end) noexcept
|
||||
: m_pointer(begin.data()),
|
||||
m_size(std::size_t(end - begin))
|
||||
{
|
||||
}
|
||||
|
||||
template<typename String,
|
||||
typename Utils::enable_if_has_char_data_pointer<String> = 0>
|
||||
SmallStringView(const String &string) noexcept
|
||||
|
||||
Reference in New Issue
Block a user