Utils: Fix smallstring

Change-Id: I681df8c3fd9aa84f14d5d581633894605f56b71a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2016-08-01 17:14:33 +02:00
parent 395d0045bd
commit 7610e48716
3 changed files with 2 additions and 7 deletions

View File

@@ -508,7 +508,6 @@ UNIT_TEST_PUBLIC:
}
private:
constexpr
SmallString(Internal::StringDataLayout data) noexcept
: m_data(data)
{

View File

@@ -66,13 +66,11 @@ public:
{
}
constexpr
const char *data() const
{
return Q_LIKELY(isShortString()) ? m_data.shortString.string : m_data.allocated.data.pointer;
}
constexpr
size_type size() const
{
return Q_LIKELY(isShortString()) ? m_data.shortString.shortStringSize : m_data.allocated.data.size;
@@ -104,13 +102,11 @@ public:
return sizeof(Internal::ShortStringLayout) - 2;
}
constexpr
bool isShortString() const noexcept
{
return !m_data.shortString.isReference;
}
constexpr
bool isReadOnlyReference() const noexcept
{
return m_data.shortString.isReadOnlyReference;
@@ -122,7 +118,7 @@ public:
}
private:
constexpr SmallStringLiteral(Internal::StringDataLayout data) noexcept
SmallStringLiteral(Internal::StringDataLayout data) noexcept
: m_data(data)
{
}

View File

@@ -66,7 +66,7 @@ SOURCES += \
chunksreportedmonitor.cpp \
unsavedfiletest.cpp \
clangisdiagnosticrelatedtolocationtest.cpp \
# smallstringtest.cpp \
smallstringtest.cpp \
highlightingmarkstest.cpp \
sizedarraytest.cpp \
utf8positionfromlinecolumntest.cpp \