Utils: Remove operator[]

Because the operator is always accessing data which has a branch is can be
much slower than iterators. SmallString is optimized for performance so
it would be quite misleading to have a non performing access operator.

Change-Id: Id882c3c12508afa393ce0766bbb680690a193c95
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Marco Bubke
2016-02-22 16:00:50 +01:00
parent 6315bd5de2
commit fc4af46bca

View File

@@ -177,16 +177,6 @@ public:
swap(first.m_data, second.m_data);
}
char &operator[](size_type index)
{
return at(index);
}
const char &operator[](size_type index) const
{
return at(index);
}
QByteArray toQByteArray() const noexcept
{
return QByteArray(data(), int(size()));