Commit fc4af46b authored by Marco Bubke's avatar Marco Bubke

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: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 6315bd5d
...@@ -177,16 +177,6 @@ public: ...@@ -177,16 +177,6 @@ public:
swap(first.m_data, second.m_data); 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 QByteArray toQByteArray() const noexcept
{ {
return QByteArray(data(), int(size())); return QByteArray(data(), int(size()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment