mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-25 03:12:56 +00:00
remove redundant QStringSplitter() members
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
cf0b0ae659
commit
43f3a2a47b
1 changed files with 4 additions and 6 deletions
|
@ -57,28 +57,26 @@ class QStringSplitter
|
|||
{
|
||||
public:
|
||||
QStringSplitter(const QString &s)
|
||||
: m_string(s), m_data(m_string.constData()), m_len(s.length()), m_pos(0)
|
||||
: m_string(s), m_pos(0)
|
||||
{
|
||||
m_splitChar = QLatin1Char('/');
|
||||
}
|
||||
|
||||
inline bool hasNext() {
|
||||
while (m_pos < m_len && m_data[m_pos] == m_splitChar)
|
||||
while (m_pos < m_string.length() && m_string[m_pos] == m_splitChar)
|
||||
++m_pos;
|
||||
return m_pos < m_len;
|
||||
return m_pos < m_string.length();
|
||||
}
|
||||
|
||||
inline QStringRef next() {
|
||||
int start = m_pos;
|
||||
while (m_pos < m_len && m_data[m_pos] != m_splitChar)
|
||||
while (m_pos < m_string.length() && m_string[m_pos] != m_splitChar)
|
||||
++m_pos;
|
||||
return QStringRef(&m_string, start, m_pos - start);
|
||||
}
|
||||
|
||||
QString m_string;
|
||||
const QChar *m_data;
|
||||
QChar m_splitChar;
|
||||
int m_len;
|
||||
int m_pos;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue